Re: /bin/sh echo \n

2020-04-26 Thread Ingo Schwarze
Hi, Martijn van Duren wrote on Sun, Apr 26, 2020 at 12:52:38PM +0200: > On 4/26/20 12:27 PM, Thomas de Grivel wrote: >> Second I don't see this feature described neither in man sh nor man >> ksh so is it a known behaviour of ksh ? > from echo(1): > echo does not support any of the backslash char

Re: /bin/sh echo \n

2020-04-26 Thread Otto Moerbeek
On Sun, Apr 26, 2020 at 01:04:05PM +0200, Otto Moerbeek wrote: > On Sun, Apr 26, 2020 at 12:27:24PM +0200, Thomas de Grivel wrote: > > > Hello, > > > > I was testing some scripting using /bin/sh and I could not find this > > behaviour in the documentation : > &

Re: /bin/sh echo \n

2020-04-26 Thread Otto Moerbeek
On Sun, Apr 26, 2020 at 12:27:24PM +0200, Thomas de Grivel wrote: > Hello, > > I was testing some scripting using /bin/sh and I could not find this > behaviour in the documentation : > > > $ /bin/sh > > $ echo -n '\n' > > > > $ > > It see

Re: /bin/sh echo \n

2020-04-26 Thread Martijn van Duren
On 4/26/20 12:27 PM, Thomas de Grivel wrote: > Hello, > > I was testing some scripting using /bin/sh and I could not find this > behaviour in the documentation : > >> $ /bin/sh >> $ echo -n '\n' >> >> $ > > It seems that ksh even in sh (po

/bin/sh echo \n

2020-04-26 Thread Thomas de Grivel
Hello, I was testing some scripting using /bin/sh and I could not find this behaviour in the documentation : > $ /bin/sh > $ echo -n '\n' > > $ It seems that ksh even in sh (posix ?) mode does expansion of \n to an actual newline. First is there a way to turn off the