Word splitting and arithmetic expansion

2010-12-28 Thread Jan Schampera
Hello list, maybe something for old stagers. Bash (and POSIX, and Korn, ...) do field/word splitting on the result of arithmetic expansions. This is fine, the behaviour per se is not a problem at all. However, I wonder about the original thought behind it: Is there a specific reason or need

Re: Word splitting and arithmetic expansion

2010-12-28 Thread Chet Ramey
On 12/28/10 2:50 PM, Jan Schampera wrote: > Hello list, > > maybe something for old stagers. > > Bash (and POSIX, and Korn, ...) do field/word splitting on the result of > arithmetic expansions. This is fine, the behaviour per se is not a problem > at all. > > However, I wonder about the origina

how to escape single quote?

2010-12-28 Thread ali hagigat
I wonder if anybody knows how to escape a single quote character by /bin/sh or bash? echo 'ppp\'qqq'' ppp\qqq Please look at the above example and the result. Regards

Re: how to escape single quote?

2010-12-28 Thread Mart Frauenlob
On 29.12.2010 08:28, ali hagigat wrote: I wonder if anybody knows how to escape a single quote character by /bin/sh or bash? echo 'ppp\'qqq'' ppp\qqq Please look at the above example and the result. Regards from man bash: Enclosing characters in single quotes preserves the literal valu