* [TUHS] echo in v6/v7/sysvr2
@ 2021-12-28 21:15 Will Senn
2021-12-28 21:48 ` Will Senn
2021-12-28 21:49 ` Steffen Nurpmeso
0 siblings, 2 replies; 3+ messages in thread
From: Will Senn @ 2021-12-28 21:15 UTC (permalink / raw)
To: TUHS main list
[-- Attachment #1: Type: text/plain, Size: 511 bytes --]
Is it possible to use echo to send a vt-100 escape sequence in v6/v7/sysvr2?
I can write a c program to clear the screen and go home in sysvr2:
#define ASCII_ESC 27
main()
{
printf( "%c[2J", ASCII_ESC );
printf( "%c[H", ASCII_ESC );
}
and it works fine. I can type the escape sequences in as well, but I'd
just as soon write a shell script with an echo '[[2J;[[H' or something
similar without having to compile a clear command. Is it possible and
what do I need to know :)?.
Thanks,
Will
[-- Attachment #2: Type: text/html, Size: 909 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [TUHS] echo in v6/v7/sysvr2
2021-12-28 21:15 [TUHS] echo in v6/v7/sysvr2 Will Senn
@ 2021-12-28 21:48 ` Will Senn
2021-12-28 21:49 ` Steffen Nurpmeso
1 sibling, 0 replies; 3+ messages in thread
From: Will Senn @ 2021-12-28 21:48 UTC (permalink / raw)
To: TUHS main list
[-- Attachment #1: Type: text/plain, Size: 797 bytes --]
Duh! RTFM - man echo (pdf, cuz I haven't quite figured out how got
system pages yet):
echo '\033[2J\033[H'
works fine. The advantage of the c program is it doesn't put a newline
after the escape sequences...
On 12/28/21 3:15 PM, Will Senn wrote:
> Is it possible to use echo to send a vt-100 escape sequence in
> v6/v7/sysvr2?
>
> I can write a c program to clear the screen and go home in sysvr2:
>
> #define ASCII_ESC 27
> main()
> {
> printf( "%c[2J", ASCII_ESC );
> printf( "%c[H", ASCII_ESC );
> }
>
> and it works fine. I can type the escape sequences in as well, but I'd
> just as soon write a shell script with an echo '[[2J;[[H' or something
> similar without having to compile a clear command. Is it possible and
> what do I need to know :)?.
>
> Thanks,
>
> Will
[-- Attachment #2: Type: text/html, Size: 1517 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [TUHS] echo in v6/v7/sysvr2
2021-12-28 21:15 [TUHS] echo in v6/v7/sysvr2 Will Senn
2021-12-28 21:48 ` Will Senn
@ 2021-12-28 21:49 ` Steffen Nurpmeso
1 sibling, 0 replies; 3+ messages in thread
From: Steffen Nurpmeso @ 2021-12-28 21:49 UTC (permalink / raw)
To: Will Senn; +Cc: TUHS main list
Will Senn wrote in
<84e6263e-f990-cf9d-b988-55d15217771f@gmail.com>:
|Is it possible to use echo to send a vt-100 escape sequence in v6/v7/sys\
|vr2?
|
|I can write a c program to clear the screen and go home in sysvr2:
|
|#define ASCII_ESC 27
|main()
|{
| printf( "%c[2J", ASCII_ESC );
| printf( "%c[H", ASCII_ESC );
|}
|
|and it works fine. I can type the escape sequences in as well, but I'd
|just as soon write a shell script with an echo '[[2J;[[H' or something
|similar without having to compile a clear command. Is it possible and
|what do I need to know :)?.
cat is considered harmful.
Is it???
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-28 21:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-28 21:15 [TUHS] echo in v6/v7/sysvr2 Will Senn
2021-12-28 21:48 ` Will Senn
2021-12-28 21:49 ` Steffen Nurpmeso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).