allow empty file

This commit is contained in:
ander 2021-09-14 21:54:45 +03:00
parent fcd730f905
commit d7fdc8006f
No known key found for this signature in database
GPG key ID: 0A2971E562D618F3

View file

@ -9,13 +9,7 @@ fi
if [ -f "$file" ] if [ -f "$file" ]
then then
if [ -s "$file" ]
then
cat "$file" cat "$file"
else
echo "$file is empty" >&2
exit 1
fi
else else
echo "$file do not exist" >&2 echo "$file do not exist" >&2
exit 1 exit 1