2 Replies Latest reply: Aug 7, 2013 1:51 PM by 966239 RSS

    What to use in shell script for CR when \n doesn't work.

    966239

      Hi I'm new to LINUX and I'm writing a shell script.

       

      I noticed when I'm at the command line I can type:

       

      echo "one\ntwo"

       

      and it will produce:

       

      one

      two

       

      when I put that SAME line in a shell script I get:

       

      onentwo

       

      Why? What can I use as CR character in a UNIX shell script that will work?