[wellylug] Command Line Carriage Return Question
JP
jumbophut at yahoo.co.in
Mon May 3 14:03:43 NZST 2004
--- Chris Hodgetts wrote:
> Hello, I have a command line Jabber messenger tool.
> (Being used for alerts and things)
>
> It appears that I can only send messages in a single
> line format.
>
> I have tried entering the \r and \n and everything
> else I can think of
> to get carriage returns into the message but to no
> avil.
>
> How I am invoking the script is
>
> ./jabber.pl jabbername at jabber.server "Testing \n
> Does this work \r I
> hope so"
>
>
> Someone suggested that I insert the ASCII CR (0x0A)
> which may work,
> however I have never inserted anything like this
> before
>
Try this (note the $ sign and single quotes):
./jabber.pl jabbername at jabber.server $'Testing \n Does
this work \n I hope so'
or this:
./jabber.pl jabbername at jabber.server $'Testing \xA
Does this work \xA I hope so'
(man bash explains why these would work).
Alternatively, this might be a jabber thing, in which
case I unfortunately can't help.
Do an echo $'Testing \n Testing' and an echo $'Testing
\xA Testing' to see if the shell is doing the right
thing (perhaps with the -e option to echo, but I don't
think it is required). If bash is working, it's
probably your .pl script or whatever protocol jabber
uses.
Cheers
Tony
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/
More information about the wellylug
mailing list