How to stop bash shell script when it has error
set -e
refer to code:
.
#!/bin/bash
set -e
echo "Starting script..."
ls /path/that/does/not/exist
echo "This line will not be executed."
..
thank you .
www.marearts.com
The study blog from marearts.com
Computer Vision & Machine Learning Research Laboratory
set -e
refer to code:
.
..
thank you .
www.marearts.com