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 provide bash code to associate with
various elements of the workflow. When the user launches the workflow,
the various bash code they provided will all eventually be run. But
running the entire workflow potentially takes days or weeks.

It would be very desirable to be able to do a syntax sanity check on
the user-provided bash code prior to actually running it, in order to
let the user know if there are bash syntax errors in their code before
actually launching the workflow.

Thanks,
Lane Schwartz

Reply via email to