RE: bash -n doesn't seem to catch all syntax errors...

2007-10-17 Thread Ken Failbus
Thanks for your reply. That would certainly help. Regards, Ken -Original Message- From: Chet Ramey [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 16, 2007 9:51 PM To: Ken Failbus Cc: Andreas Schwab; bug-bash@gnu.org; [EMAIL PROTECTED] Subject: Re: bash -n doesn't seem to catc

Re: bash -n doesn't seem to catch all syntax errors...

2007-10-16 Thread Chet Ramey
Ken Failbus wrote: > So how can bash script syntax be verified that includes shopt??? > Is there more option on bash syntax command-line check that would make it > identify this grammar??? One uses the `-O' invocation option to enable and disable shopt options at execution time. You would use `b

RE: bash -n doesn't seem to catch all syntax errors...

2007-10-16 Thread Ken Failbus
, October 16, 2007 10:14 AM To: Ken Failbus Cc: bug-bash@gnu.org Subject: Re: bash -n doesn't seem to catch all syntax errors... "Ken Failbus" <[EMAIL PROTECTED]> writes: > bash -x /tmp/mydummy > + shopt -s extglob > + rm -f '/tmp/file.+([0-9])' > + ex

Re: bash -n doesn't seem to catch all syntax errors...

2007-10-16 Thread Andreas Schwab
"Ken Failbus" <[EMAIL PROTECTED]> writes: > bash -x /tmp/mydummy > + shopt -s extglob > + rm -f '/tmp/file.+([0-9])' > + exit 0 > > But if "bash -n" is run it doesn't understands +([0-9}) > bash -n /tmp/mydummy > /tmp/mydummy: line 3: syntax error near unexpected token `/tmp/file.+([' > /tmp/my

RE: bash -n doesn't seem to catch all syntax errors...

2007-10-16 Thread Ken Failbus
his. Thanks & Regards, Ken -Original Message- From: Ken Failbus Sent: Tuesday, October 16, 2007 6:47 AM To: Stephane Chazelas Cc: bug-bash@gnu.org Subject: RE: bash -n doesn't seem to catch all syntax errors... Hi Guys, I understand that the example I provided is valid, use t

RE: bash -n doesn't seem to catch all syntax errors...

2007-10-16 Thread Ken Failbus
with a good bad example. That way I would be heading in the right direction. Ken -Original Message- From: Stephane Chazelas [mailto:[EMAIL PROTECTED] Sent: Tue 10/16/2007 3:08 AM To: Ken Failbus Cc: bug-bash@gnu.org Subject: Re: bash -n doesn't seem to catch all syntax errors...

Re: bash -n doesn't seem to catch all syntax errors...

2007-10-16 Thread Stephane Chazelas
On Mon, Oct 15, 2007 at 06:27:43PM -0400, Ken Failbus wrote: > Hi Guys, > > When I specify on command-line "bash -n ". Bash doesn't > check for valid syntax errors. E.g. if variable is missing a "$" infront > of it while assigning a value. This is not catched by bash. Is there a > more specific op

Re: bash -n doesn't seem to catch all syntax errors...

2007-10-15 Thread Jan Schampera
Ken Failbus wrote: > When I specify on command-line "bash -n ". Bash doesn't > check for valid syntax errors. E.g. if variable is missing a "$" infront > of it while assigning a value. This is not catched by bash. > ### example code > p=hello > e=world > If [ p != $e ];then > echo "not equa

Re: bash -n doesn't seem to catch all syntax errors...

2007-10-15 Thread Andreas Schwab
"Ken Failbus" <[EMAIL PROTECTED]> writes: > Hi Guys, > > When I specify on command-line "bash -n ". Bash doesn't > check for valid syntax errors. E.g. if variable is missing a "$" infront > of it while assigning a value. Bash is not Perl. Your example code is perfectly valid. Andreas. -- Andr

Re: bash -n doesn't seem to catch all syntax errors...

2007-10-15 Thread Bob Proulx
Ken Failbus wrote: > When I specify on command-line "bash -n ". Bash doesn't > check for valid syntax errors. E.g. if variable is missing a "$" infront > of it while assigning a value. This is not catched by bash. Unfortunately what you are describing is not a syntax error. It is perfectly valid