mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-25 12:58: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
|
||||
cp "$1"{,.bak}
|
||||
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