terminal - How can I clear another tty from C? -
After the
In one terminal I can clear another terminal by running:
echo -e "\ 033 \ 0143" & gt; However, if I do this by trying to do this from my program: system ("echo -e '\" / \ " 033 \ 0143 '& gt; / dev / pts / 14 "); It does not clean the screen and leaves some garbage. Any ideas about doing this?
I am programming in C for 30 years and thought it would be easy.
After
\ 0143 escape, interpreting from C is not being opened by shell Or echo , and it is considered as the \ 014 and then the digit 3 . Instead of typing 1b 63 0A , typing tty bytes 1b 0C 33 0A ends. -e is not doing anything at this point at all. I do not understand why you would rather do this than open the tty file and write directly with the bytes write (3) , though. In any case, this is actually a programming question.
Comments
Post a Comment