mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 13:18:35 -06:00
Added support for multiple files
This commit is contained in:
parent
1e81ddddae
commit
77471749d6
1 changed files with 9 additions and 0 deletions
9
makebk
9
makebk
|
@ -6,3 +6,12 @@ if [[ -n "$1" ]];
|
||||||
then
|
then
|
||||||
cp "$1"{,.bak}
|
cp "$1"{,.bak}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $# -ge 1 ]; then
|
||||||
|
for f in $@
|
||||||
|
do
|
||||||
|
[ -n "$f" ] &&cp "$f"{,.bak}
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "No filenames passed."
|
||||||
|
fi
|
Loading…
Reference in a new issue