Re: Determine if a file is a valid Bash script

2012-03-19 Thread Eric Blake
On 03/19/2012 02:15 PM, Stefano Lattarini wrote: > On 03/19/2012 08:54 PM, Lane Schwartz wrote: >> Hi, >> >> If I have a file that contains a bash script, is there any >> straightforward way of determining whether that script can be parsed >> successfully as a Bash script, without actually running

Re: Determine if a file is a valid Bash script

2012-03-19 Thread Stefano Lattarini
On 03/19/2012 08:54 PM, Lane Schwartz wrote: > Hi, > > If I have a file that contains a bash script, is there any > straightforward way of determining whether that script can be parsed > successfully as a Bash script, without actually running the file? > Yes: the "-n" option. Simple examples:

Determine if a file is a valid Bash script

2012-03-19 Thread Lane Schwartz
Hi, If I have a file that contains a bash script, is there any straightforward way of determining whether that script can be parsed successfully as a Bash script, without actually running the file? Here's the context. There is another tool (a workflow management utility) which allows users to pro