mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 05:08:36 -06:00
13 lines
209 B
Bash
13 lines
209 B
Bash
#!/bin/sh
|
|
|
|
# This simply makes backup of file(s) as filename.bak
|
|
|
|
if [ $# -ge 1 ]; then
|
|
for f in $@
|
|
do
|
|
[ -f "$f" ] && cp "$f"{,.bak}
|
|
done
|
|
else
|
|
echo "No filenames passed."
|
|
exit 1
|
|
fi
|