[wellylug] Command Line Carriage Return Question
tim at nicholas.net.nz
Wed May 5 00:19:11 NZST 2004
On 05/03/04 13:38, 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
> Could someone point me in the right direction please :)
If you are using bash for your shell then you can quite possibly just
use single quotes and then hit enter for new lines.
/jabber.pl jabbername at jabber.servre 'Testing
Does this work
I hope so.'
Are you sure it wont accept the string from standard in? If so then
echo -e "Testing \n Does this work \n I hope so" | /jabber.pl
jabbername at jabber.server or similar.
Just another couple of ideas.
Tim Nicholas || Cilix
Email: tim at nicholas.net.nz || Wellington, New Zealand
http://tim.nicholas.net.nz/ || Cell/SMS: +64 21 337 204
More information about the wellylug