About Bash Options

目次

 

-e

If an error (non-zero exit code) occurs in a series of shell script operations, exit there and return an error.

RESULT=`bash -e example.sh`

if [ $? -ne 0 ]
then
~処理~
fi

 

-x

debug mode

It outputs every execution result to standard output.

 

 

 

 

 

おすすめの記事