read not terminated with EOF/^D when -n or -N is used

2010-12-26 Thread Isaac Good
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/ locale' -DPACKAGE='b

Re: read builtin does not return success code (0) in spite of it successfully read line

2010-12-26 Thread Stephane CHAZELAS
2010-12-24, 13:20(+05), Коренберг Марк: [...] > mma...@mmarkk-work:/tmp$ echo aaa > /tmp/test1 > mma...@mmarkk-work:/tmp$ read x < /tmp/test1 && echo success > success > mma...@mmarkk-work:/tmp$ echo $x > aaa > mma...@mmarkk-work:/tmp$ > > BUGGY CASE: > mma...@mmarkk-work:/tmp$ echo -n bbb > /tmp/t

Re: backslash required for [\/]

2010-12-26 Thread Stephane CHAZELAS
2010-12-25, 20:30(+08), jida...@jidanni.org: [...] > While we are here, here's another interesting phenomena, > $ touch aa > $ echo a[ab] > aa > $ echo a[ab/] > a[ab/] > $ echo a[ab\/] > a[ab/] > $ mkdir ab #doesn't help... That's the same as in every other shell and as specified by POSIX. So, any