On 03-Apr-07 13:17:42, MJ Ray wrote:
Chris G cl@isbd.net wrote:
However the problem is that using 'echo' to see what you have done is totally useless as echo does so many clever things under the cover that you don't get to see what's actually in the variable at all.
If you do the above and then say "echo $fred" you just get:-
That's bash doing the "clever" thing not echo. The command you want to use to check is: echo "$fred" ...which stops bash fiddling with the whitespace before passing it to echo (same happens with both the builtin and /bin/echo).
Hope that helps,
MJ Ray - see/vidu http://mjr.towers.org.uk/email.html
Yep!!!
fred="abcde
ghijk"
echo "$fred" abcde ghijk
... despite my previous mail (which didn't think of the quoting at all)!
Nice one. Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) ted.harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 03-Apr-07 Time: 14:36:05 ------------------------------ XFMail ------------------------------