Error if input file doesn't exist

This commit is contained in:
The Magician 2024-03-07 12:52:58 +00:00
parent 56578bdc3e
commit 54b22aa38f
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,11 @@ main() {
fi
inputfile="$1"
if ! test -e "$inputfile"; then
echo "Input file $inputfile does not exist."
return 2
fi
outputfile="$2"
echo "$inputfile" "$outputfile"