mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-25 12:58:35 -06:00
Added error reporting
This commit is contained in:
parent
77471749d6
commit
78e4407287
2 changed files with 3 additions and 1 deletions
3
makebk
3
makebk
|
@ -10,8 +10,9 @@ fi
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
for f in $@
|
for f in $@
|
||||||
do
|
do
|
||||||
[ -n "$f" ] &&cp "$f"{,.bak}
|
[ -f "$f" ] &&cp "$f"{,.bak}
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "No filenames passed."
|
echo "No filenames passed."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
1
touch2
1
touch2
|
@ -10,4 +10,5 @@ if [ $# -ge 1 ]; then
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "No filenames passed."
|
echo "No filenames passed."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue