mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 05:08:36 -06:00
code cleanup
This commit is contained in:
parent
5fe58e29f2
commit
7d2a42b8ad
1 changed files with 3 additions and 3 deletions
6
makebk
6
makebk
|
@ -1,13 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This simply makes a backup of a file as filename.bak
|
# This simply makes backup of file(s) as filename.bak
|
||||||
|
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
for f in $@
|
for f in $@
|
||||||
do
|
do
|
||||||
[ -f "$f" ] &&cp "$f"{,.bak}
|
[ -f "$f" ] && cp "$f"{,.bak}
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "No filenames passed."
|
echo "No filenames passed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue