Discussion:
New line with xmessage?
David selby
2003-06-19 18:39:05 UTC
Permalink
Having quite a bit of success with bash, got first script to work, auto
archives a backup every day and delete the oldest backup files if
partition is >95% full ...

Want to try something more adventurous however am stuck on something
soooo simple, how do I generate a new line in xmessage

I got round it with echo
echo -e "hello \n everybody"

However
xmessage "hello \n everybody", takes it literally, all on one line

I checked man xmessage but there is no corresponding "-e" enabler

Any ideas ?
Dave
Rus Foster
2003-06-19 19:00:12 UTC
Permalink
Post by David selby
Having quite a bit of success with bash, got first script to work, auto
archives a backup every day and delete the oldest backup files if
partition is >95% full ...
try xmessage -file -

this is
a
test

^D

HTH

Rgds

rus
--
www: http://www.65535.net | Hosting - Shell Accounts
MSNM: ***@65535.net | Virtual Servers from just $15/mo
e: ***@65535.net | Community: http://www.65535.org
t: +44 (0) 7092016595 | 10% Donation on every FreeBSD product
Florian Ernst
2003-06-19 19:18:03 UTC
Permalink
Hello David!
Post by David selby
Want to try something more adventurous however am stuck on something
soooo simple, how do I generate a new line in xmessage
Hm, a new line? This sort of works:

xmessage "Newline<RET>

You will get to the alternate prompt, and then continue

here!"

I'm not sure if this is what you really want, but it will give you a new
line. Hm, I never worked with xmessage before...

HTH,
Flo
Karsten M. Self
2003-06-19 23:12:19 UTC
Permalink
Post by Florian Ernst
Hello David!
Post by David selby
Want to try something more adventurous however am stuck on something
soooo simple, how do I generate a new line in xmessage
xmessage "Newline<RET>
You will get to the alternate prompt, and then continue
here!"
...or fold, or indent:

echo "some silly message" | fold -w 10 | xmessage -file -

Peace.
--
Karsten M. Self <***@ix.netcom.com> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
LNX-BBC: Bootable GNU/Linux -- Don't leave /home without it.
http://www.lnx-bbc.org/
David selby
2003-06-20 16:49:43 UTC
Permalink
Post by David selby
Having quite a bit of success with bash, got first script to work,
auto archives a backup every day and delete the oldest backup files if
partition is >95% full ...
Want to try something more adventurous however am stuck on something
soooo simple, how do I generate a new line in xmessage
I got round it with echo
echo -e "hello \n everybody"
However
xmessage "hello \n everybody", takes it literally, all on one line
I checked man xmessage but there is no corresponding "-e" enabler
Any ideas ?
Dave
Many thanks everyone, xmessage -file xxx seems to work, It seems to take
the formatting from the file and not have a problem, strange it can't
take it directly from "" however will remember this workaround.

Dave
Vineet Kumar
2003-06-20 19:04:53 UTC
Permalink
Post by David selby
Many thanks everyone, xmessage -file xxx seems to work, It seems to take
the formatting from the file and not have a problem, strange it can't
take it directly from "" however will remember this workaround.
It works with quotes if you do as Florian suggested:

xmessage "foo
bar
baz"

good times,
Vineet
--
http://www.doorstop.net/
--
http://www.digitalconsumer.org/ Protecting fair-use rights in the digital world
David selby
2003-06-21 07:48:01 UTC
Permalink
Post by Vineet Kumar
Post by David selby
Many thanks everyone, xmessage -file xxx seems to work, It seems to take
the formatting from the file and not have a problem, strange it can't
take it directly from "" however will remember this workaround.
xmessage "foo
bar
baz"
good times,
Vineet
Yep, sure does ... I didn't originaly think this would be of use till I
realised I could literaly split the line up in vi, make the script
executable and it came out as I wanted ...I thought it only worked on
the command line.

This is a good way to go it.

Dave
(many thanks Florian)

Loading...