1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-26 13:18:35 -06:00
random/makebk

14 lines
209 B
Text
Raw Normal View History

2021-12-28 02:54:26 -06:00
#!/bin/sh
2021-04-19 13:54:49 -05:00
2022-07-31 00:27:10 -05:00
# This simply makes backup of file(s) as filename.bak
2022-01-02 22:35:07 -06:00
2022-01-22 18:38:42 -06:00
if [ $# -ge 1 ]; then
for f in $@
do
2022-07-31 00:27:10 -05:00
[ -f "$f" ] && cp "$f"{,.bak}
2022-01-22 18:38:42 -06:00
done
else
echo "No filenames passed."
2022-01-22 18:46:56 -06:00
exit 1
2022-07-31 00:27:10 -05:00
fi