[sclug] Bash boohoo
pieter claassen
pieter at openauth.co.uk
Sat Oct 25 09:05:36 UTC 2003
Thanks all for the help.
Pieter
On Tue, 2003-04-15 at 18:19, J. Mann wrote:
> On Monday 14 April 2003 4:07 pm, pieter claassen wrote:
>
> > RESULT=`brctl show` # returns three lines of info on bridge info
> > echo $RESULT #prints all three lines on one line
> >
> > Why does the last line not honour the "\n" (0x0a)?
>
> Because it is in the Internal Field Seperator (IFS).
> The default IFS is a space, a tab and a newline.
>
> > But more important, how do I fix this?
>
> Well, you could change the IFS to nothing:
>
> RESULT=`brctl show`
> IFS=
> echo $RESULT
>
> or, as already suggested, quote the string:
>
> RESULT=`brctl show`
> echo "$RESULT"
>
> Regards,
> Jon.
> _______________________________________________
> sclug mailing list
> sclug at sclug.org.uk
> http://www.sclug.org.uk/mailman/listinfo/sclug
--
-----------------------------
Pieter Claassen
pieter at openauth.co.uk
http://www.openauth.co.uk
OpenAuth
Tel: 01344 390530
DDI: 01344 390630/390631
Fax number: 01344 390700
Mobile: 0776 665 6924
Highview House
Charles Square
Bracknell
Berkshire
RG12 1DF
TERMS AND CONDITIONS
(i)The information contained in this email and attachments is only
intended for the addressed recipient(s) and may not be distributed or
viewed by any other party without the explicit consent of the sender. If
you have received this message by accident, please contact Pieter
Claassen (pieter at openauth.co.uk) and destroy any electronic or physical
copies of the information contained in it, immediately.
(ii)This email is not certified to be virus free and OpenAuth accepts no
liability for losses arising from you receiving this email.
(iii)Any digital signatures (if present) used to authenticate this
email, only serves to allow you to verify the originating email address
of the sender and should not be relied upon to prove identity or base
financial transactions on, unless the Certificate Practice Statement
that the signature references, explicitly states differently.
(iv)This email may be subjected to further terms and conditions as
published on the company website at http://www.openauth.co.uk. If you
need to rely on the information contained in this email in any way, then
you should read those terms and conditions to understand how much you
can trust the information in this email.
(v)OpenAuth retains the copyright on any relevant material that is
included in this email.
More information about the Sclug
mailing list