Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 2011 17:24:43 -0800
From:      Edward Martinez <eam1edward@gmail.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   why  newline scape sequence does  not work in Freebsd's  bash
Message-ID:  <4EFE645B.8010906@gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,


Why  the scape sequence; newline (\n) does not work  in  FreeBSD's  
bash,  However, it works  both  in Linux and Solaris bash?


For instance, when i type something basic using the newline scape 
sequence in FreeBSD bash i get this:

    $ FRUIT_BASKET="apple oranges pears"
    $ echo "My fruit basket contains:\n$FRUIT_BASKET"
     My fruit basket contains:\napple oranges pears


  the newline  becomes part of stdout, but it works in linux and 
solaris; the output is shown in two separate lines.
  is there is setting i have to change in FreeBSD's shell  init file so 
it will behave like linux and solaris bash shell or use just use "printf"?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EFE645B.8010906>