Kevin B. O'Brien ([EMAIL PROTECTED]) wrote:
[...]
> OK, I got it working. The problem was that I left out some quote
> marks in what I was echoing.
>
> Now I am getting everything as one line. How do I insert a "return"
> to get a new line?
Kevin,
use the \n character wherever you want a new line. Like this:
echo -e "this is \n a new line"
you will also need the -e option to evaluate the backlashed escaped
characters like \n.
man echo for more info.
or you can use the fmt command to limit the width, for example,
from Glenn's script, pipe the output of fortune to fmt (68 characters
wide):
----------------------- example -------------------------------
/usr/games/fortune | fmt -w 68
I'D LIKE TO BE BURIED INDIAN-STYLE, where they put you up on a high rack,
above the ground. That way, you could get hit by meteorites and not
even feel it.
-- Jack Handley, The New Mexican, 1988
----------------------- example -------------------------------
HTH,
p.s.
my fortune command was in /usr/games/
--
RickS
"If I would have been frozen in carbonite like Han Solo, I
would have had a cooler pose, like flippin' the bird." -Joseph
David Fiedler
____________________________________________________
Want to buy your Pack or Services from Mandriva?
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________