improved zip-seperate script by implementing passing the file extention to zip
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
for filename in *.iso; do
|
file_ext="${1:-.iso}"
|
||||||
|
|
||||||
|
for filename in *"$file_ext"; do
|
||||||
echo "Zipping file: $filename"
|
echo "Zipping file: $filename"
|
||||||
gzip "$filename"
|
gzip "$filename"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user