Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

control Z

2 views
Skip to first unread message

Bryan Kelly

unread,
May 28, 1999, 3:00:00 AM5/28/99
to
How do I insert a control z into a string to send out to a process?
We managed to insert an actual control Z into a string and use that, but
when I edit the file I get a space on the screen and must comment it
profusely. What is the proper way to do this?

Thank you,
Bryan

laurent....@cgi.ca

unread,
May 29, 1999, 3:00:00 AM5/29/99
to

Ummm.. I hope this isn't wrong but I think \NNN where NNN is the octal value
of the character you want to insert will work. So in your case, I think you
want

set string "Some chars\026"

Of course, it's almost 1 am and I've been up since 6am...

--
Penguin Power! Nothing I say reflects the views of my employer

Laurent Duperval mailto:laurent....@cgi.ca
CGI - FWFM Project Phone: (514) 391-9523

Bryan Kelly

unread,
May 29, 1999, 3:00:00 AM5/29/99
to
re:Ummm.. I hope this isn't wrong but I think \NNN where NNN is the octal

value
of the character you want to insert will work. So in your case, I think you
want

That looks right. I don't know why I didn't think of it, but it never came
close to my mind.

Thank you,
Bryan


lvi...@cas.org

unread,
May 31, 1999, 3:00:00 AM5/31/99
to

According to <laurent....@cgi.ca>:

:Ummm.. I hope this isn't wrong but I think \NNN where NNN is the octal value

:set string "Some chars\026"

Except, if \nnn is octal, you just had them insert a (2*8) + 6 = 16+6 = 22
instead of a 26 .... I think you mean a \032 ...

--
<URL: mailto:lvi...@cas.org> Quote: Saving the world before bedtime.
<*> O- <URL: http://www.purl.org/NET/lvirden/>
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.

laurent....@cgi.ca

unread,
May 31, 1999, 3:00:00 AM5/31/99
to
lvi...@cas.org wrote:

> According to <laurent....@cgi.ca>:
> :Ummm.. I hope this isn't wrong but I think \NNN where NNN is the octal value

> :set string "Some chars\026"

> Except, if \nnn is octal, you just had them insert a (2*8) + 6 = 16+6 = 22
> instead of a 26 .... I think you mean a \032 ...

Uhh... like I said, it was 1 am... I hope Bryan caught that before he crashed
his program. :-)

L

Bryan Kelly

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
RE: set string "Some chars\026"

Yeah, I did see that. The decimal value of ^z is 26, octal is 032, and hex
is 1A.

From memory, you had the right number and were closer that I would have
been. Regardless, you gave me what I needed.

However, since I really don't like octal (Look at a dump in octal and try
to figure out the characters in the bytes), I went for the hex format.
OX1A and 0x1A did not work. Period. The program (that I am telnetting to
on another computer) needs a control Z to stop and they did not work. I had
to go to the octal format. That is to say this did not work:
send "\0X1A"
and
send "0x1A"

Any clues on this?

Oops, I did not try the lower case A on both. I will tomorrow. Still, 0X1A
should work.

Bryan


Cameron Laird

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
In article <BbZ43.717$Gj1....@news13.ispnews.com>,
.
.
.
You want
send \x1A
See <URL:http://www.scriptics.com/man/tcl8.1/TclCmd/Tcl.htm>.
--

Cameron Laird http://starbase.neosoft.com/~claird/home.html
cla...@NeoSoft.com +1 281 996 8546 FAX

0 new messages