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
1 changed files with 6 additions and 0 deletions

View File

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