Added option to define the directory as well as the necessary bash-it arguments
parent
af402cc6f0
commit
b198e3e8fa
|
|
@ -177,7 +177,13 @@ command_exists ()
|
||||||
|
|
||||||
batch_zip ()
|
batch_zip ()
|
||||||
{
|
{
|
||||||
for f in *; do zip "${f%%.*}.zip" "$f"; done
|
about 'individually compresses each file in a directory'
|
||||||
|
param '1: directory name'
|
||||||
|
example '$ batch_zip'
|
||||||
|
example '$ batch_zip ~/PDFs'
|
||||||
|
group 'base'
|
||||||
|
[ -z ${1+x} ] && local directory=${PWD} || local directory=$1
|
||||||
|
for f in "${directory}"/*; do zip "${f%%.*}.zip" "$f"; done
|
||||||
}
|
}
|
||||||
|
|
||||||
# useful for administrators and configs
|
# useful for administrators and configs
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue