Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: Help with echo

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Help with echo

    Hello i am making a script that is suppose to automate the use of DNS servers and I am trying to echo the configuration and write it to a specific file. I am using gedit and this configuration has multiple lines as well as quotes. For example here is part of this:
    echo $TTL 3D
    IN SOA test test(
    1 ; Serial
    1D ; Refresh
    2D ; Retry
    2D ; Expire
    2D ; Negative Cache TTL
    ); > filenamehere
    How would i echo this exactly the way it is to a certain file?
    Thank you

  2. #2

    use quotes
    echo "a

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    A Here document might help
    Here Documents

    However, you might want to have a look at puppet or chef for automation purposes.
    You must always face the curtain with a bow.

  4. $spacer_open

Posting Permissions

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