Vivek Joshi's Weblog

Thursday Feb 09, 2006

Simple echo puzzle


I wasn't aware of echo magic until I was stuck in one of the script ...

#test="Hello     World"
#echo $test
Hello World

echo has removed extra white spaces above ... I get the desired output as follows :-)

#echo "$test"
Hello     World

Comments:

not echo! shell. the shell removed the white space. The shell doesn't care about white space other than it seperates arguments, it just passes two arguments to echo; argument 1 is Hello and argument 2 is World.

Posted by reha gur on February 14, 2006 at 10:30 PM IST #

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referrers