[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
((...) && (...)) parsing confused by line break
From: |
Tim Waugh |
Subject: |
((...) && (...)) parsing confused by line break |
Date: |
Mon, 31 Jan 2005 12:15:39 +0000 |
User-agent: |
Mutt/1.4.1i |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -g -pipe -D_FORTIFY_SOURCE=2 -m32 -march=i386
-mtune=pentium4
uname output: Linux gene.surrey.redhat.com 2.6.9-1.667 #1 Tue Nov 2 14:41:25
EST 2004 i686 i686 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu
Bash Version: 3.0
Patch Level: 16
Release Status: release
Description:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146638
This script fails:
( (echo line1) \
&& (echo line2))
((echo line3) && (echo line4))
((echo line5) \
&& (echo line6))
like this:
line1
line2
line3
line4
test.sh: line 5: syntax error near unexpected token `'
test.sh: line 5: `&& (echo line6))'
It seems as though the problem line might be being treated as
though it is a ((...)) compound command, rather than nested
subshells.
Repeat-By:
bash test.sh
pgpUXkZ0PIl6z.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ((...) && (...)) parsing confused by line break,
Tim Waugh <=