Cancel script if input file could not be found

This commit is contained in:
Jan Jastrow 2022-02-01 16:18:19 +01:00
parent de751365d5
commit 0a09475342

View File

@ -7,6 +7,12 @@ fi
# Input variables # Input variables
INPUT=$1 INPUT=$1
if [ ! -f "$INPUT" ]; then
echo "File not found."
exit 1
fi
COLS=$2 COLS=$2
if [ -z "$COLS" ]; then if [ -z "$COLS" ]; then
COLS=5 COLS=5