delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/12/19/15:25:25

From: ads AT rmbmain DOT rmb DOT co DOT za
Subject: bash builtin "echo" default behaviour wrong?
19 Dec 1997 15:25:25 -0800 :
Message-ID: <9711198825.AA882590468.cygnus.gnu-win32@smtpw.rmb.co.za>
To: gnu-win32 AT cygnus DOT com

Hi,

How do I change to default behaviour of the bash builtin "echo" command to 
process the backslash-escape?

bash-2.01$ echo "first \n next"
first \n next
bash-2.01$ echo -e "First \n next"

bash-2.01$ echo -e "first \n next"
first
 next
bash-2.01$

bash --posix does not help.

I know I can use an alias or a function, but why is this different from the
Bourne Shell (/bin/sh) and Korn Shell) (/bin/ksh) and /bin/echo

Thanks

Alberto da Silva
ads AT rmb DOT co DOT za

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019