Hello friends, ============== [EMAIL PROTECTED] wrote:
> 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 '\'. Ehm... This is true. I tried the chat on the command line and it works just fine. However, if someone tries to run chat within pppd (parameter "connect") without '\', it goes awry. Here, have a look at this: I type this command: knm:~# pppd /dev/ttyS0 connect "chat -v '' 'at$n=1' OK" And this is what I found in /var/log/ppp.log: Feb 15 19:12:07 knm pppd[494]: pppd 2.2.0 started by root, uid 0 Feb 15 19:12:08 knm chat[495]: send (at=1^M) Feb 15 19:12:08 knm chat[495]: expect (OK) Feb 15 19:12:08 knm chat[495]: at=1^M^M ##### <--- see that ?! Feb 15 19:12:08 knm chat[495]: OK -- got it However, if I try this command: knm:~# pppd /dev/ttyS0 connect "chat -v '' 'at\$n=1' OK" it is correct then: Feb 15 19:13:40 knm pppd[502]: pppd 2.2.0 started by root, uid 0 Feb 15 19:13:41 knm chat[503]: send (at$n=1^M) Feb 15 19:13:41 knm chat[503]: expect (OK) Feb 15 19:13:41 knm chat[503]: at$n=1^M^M Feb 15 19:13:41 knm chat[503]: ERROR^M My modem doesn't know the $n directive so it returns ERROR, that's fine. As I do not use pon and poff scripts (maybe I should, what do you think?), rather call pppd directly, I have to use multiple-backslash convention ;-) Number of backslashes used is mostly empirically guessed :) Thanks for making my knowledges wider ;-) Everything the best, Peter -- ********************************* * Peter Paluch * * Kukucinova 939/35 * * Kysucke Nove Mesto * * 024 01 * * Slovakia, Europe * * ----------------------------- * * tlf: +421 826 421 2542 * * e-mail: [EMAIL PROTECTED] * ********************************* -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .