Corrupted syntax error messages for null substring expansion in arithmetic expression

2006-05-23 Thread Edward Catmur
Hm, that's a mouthful. Running bash 3.1.17. $ bash -c 'foo=""; (( ${foo:1} < 10 ))' bash: Xl: < 10 : syntax error: operand expected (error token is "< 10 ") ^^^ The characters indicated by carets above differ from run to run depending on memory usage. Obviously, this indicates that bash is

Re: here document and STDIN

2006-05-23 Thread Paul Jarc
"Cai Qian" <[EMAIL PROTECTED]> wrote: > The information is helpful. The problem by using > > perl -e ' >X > ' > > is that there seems no way to using single quota in Perl code any more. It's not very concise, but you can do this: perl -e ' ... '\'' ... ' >From the shell's point of vi

Re: here document and STDIN

2006-05-23 Thread Cai Qian
The information is helpful. The problem by using perl -e ' X ' is that there seems no way to using single quota in Perl code any more. On 5/23/06, Paul Jarc <[EMAIL PROTECTED]> wrote: "Cai Qian" <[EMAIL PROTECTED]> wrote: > For following code, > > sh < read > EOF > > I have no ide

Re: export does not work on array

2006-05-23 Thread Chet Ramey
Byron Clark wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i486 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' > -DCONF_OSTYPE='linux-gnu' - \DCONF_MACHTYPE='i486-pc-linux-gnu' > -DCONF_VENDOR='pc' -DLOCALEDI

Re: here document and STDIN

2006-05-23 Thread Paul Jarc
I wrote: > sh < read <&3 > EOF Sorry, that first line should be: sh 3<&0

Re: here document and STDIN

2006-05-23 Thread Paul Jarc
"Cai Qian" <[EMAIL PROTECTED]> wrote: > For following code, > > sh < read > EOF > > I have no idea why will not block. The "read" command reads from the shell's stdin, which is the here document. At the point where the "read" command is executed, the shell has already read the "read" comman

here document and STDIN

2006-05-23 Thread Cai Qian
Hi, For following code, sh

Re: file test bug in bash 3.1

2006-05-23 Thread Chet Ramey
Zackary Deems wrote: > echo "blah" >/tmp/blah > ln -s /tmp/blah /tmp/blah.link > if [[ -f "/tmp/blah.link" ]] > then >echo "/tmp/blah.link is a regular file" > else >echo "/tmp/blah.link is NOT a regular file" > fi > > links now match for both links and regular files. This plays hell with