[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: more ?s WHOOPS!!!!!



Peter Paluch writes:
> You should use only one backslash, so as follows:

> chat -v "" 'atq0v1x3\$n1=1' OK

The single quotes are suffient to protect the '$' from the shell.  The '\'
is harmless but unnecessary as '$' is not special to chat.  In this case
chat just eats the '\', determines the the '$' is not one of its special
characters, sends the '$', and proceeds.  I do not recommend relying on
this behavior however, since it is undocumented.  Chat could just as well
eat non-special characters preceeded by a '\'.

A simple way to test chatscripts is to run them from the command line,
after editing them to add '\n' to the end of each send string so that you
will be able to see what you are doing.  Type:

chat -v "" 'atq0v1x3$n1=1\n' OK '\n' CONNECT

type in the responses, and see what happens.
-- 
John Hasler
john@dhh.gt.org (John Hasler)
Dancing Horse Hill
Elmwood, WI


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: