View Single Post
  #3   (View Single Post)  
Old 27th December 2009
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

Quote:
Originally Posted by J65nko View Post
...
THAT=" zz
yy
xx
ww
"

...

echo THAT: [${THAT}][/code]

...

THAT: [ zz yy xx ww ][/code]Who can explain?
[, ], zz, yy, xx, ww become individual arguments (default IFS is whitespace) to the echo command & echo prints its arguments separated by a space.
You have used single/double quotes to define $THIS & $THAT respectively but it makes no difference as the quotes are not preserved in the shell variable.
Was that the question?

Last edited by ephemera; 27th December 2009 at 07:09 AM.
Reply With Quote