Posted:
Fri Apr 01, 2011 7:12 am (14 years, 1 month ago)
Trying to follow the script Bob Moss has on pg 48-51. Just a beginner so please have patience. When I get to point
var=$1
echo $var
and then type
sh script_tutorial.sh ''Hello,World\!''
I must assume that the quotes here are two single quotes at the beginning of the Hello,World string and at the end of the line. If I try double quotes here I get
Hello,World\!
and on the next step, sending the value of the argument ($1) to the file sample.txt results in a blank file.
It does work with two single quotes, though. Is this correct? Why is it necessary to escape the ! question mark
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.