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
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
, 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
"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
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
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...
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
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
"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
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
10 matches
Mail list logo