Find the answer to your Linux question:
Results 1 to 3 of 3
I know this is rather simple I need to echo into a file the string $hello but I do not want it to be considered as a variable but as ...
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    8

    escape character

    I know this is rather simple

    I need to echo into a file the string $hello but I do not want it to be considered as a variable but as a string such that $hello is printed into the file

    echo "$hello" >> /test;

    ?????

    Thanks in advance

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Use single quotes if you don't want to expand a variable.

    Go here for the tutorials:

    http://www.tldp.org/LDP/Bash-Beginne...tml/index.html
    http://tldp.org/LDP/abs/html/
    Linux Shell Scripting Tutorial - A Beginner's handbook

    Regards

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    8
    Thanks a million
    A

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...