Why isn't the following linux command working from the RunProcess interface? I want to change the terminal size programmatically and then display the information:
commands[sequence__]:=StringJoin@Riffle[{sequence}," && "];
bashMode=commands[
"echo Status for device CON:",
"echo ----------------------",
"echo '\tTerminal Type: $(tput longname)'",
"echo '\tLines: $(tput lines)'",
"echo '\tColumns: $(tput cols)'",
"echo '\tColors: $(tput colors)'"
];
RunProcess[{"bash","-c",commands[
"printf '\\e[8;24;90t'",
bashMode
]}]
Since I don't know linux very well. If there is a way to join these commands into one, feel free to suggest that as well!
By the way I am on Windows and accessing bash through the Windows Subsystem for Linux.
I think the problem here might be ASCII control character ESC needed in the printf command to control the terminal: printf '\e[8;24;90t'. Since running this directly works but for some reason mathematica is unable to send this character to the bash correctly.
See: Bug report about escape characters not going through bash

RunProcess[{"bash", "-c", "echo \"lines\\ncols\"|tput -S"}]might give some insight as to the output you can expect here. – ktm Aug 28 '19 at 13:01tput longnamedoes return its name. Also you can change properties likecolor, etc. But it is hidden like when usingWebExecuteyou can launch a browser in hidden mode. Under mathematica subprocesses in Task Manager you can see theConsole Window Hostwhile theRunProcessis running. – user13892 Aug 28 '19 at 13:17mode con:cols=200 lines=35. – Andrew Norton Aug 31 '19 at 02:56