Improved syntax

This commit is contained in:
Sun Knudsen 2021-05-03 07:40:09 -04:00
parent ccccd187e6
commit 09577bf0f7
No known key found for this signature in database
GPG key ID: 1FA767862BBD1305
15 changed files with 100 additions and 100 deletions

View file

@ -3,7 +3,7 @@
rounds=3
positional=()
while [[ $# -gt 0 ]]; do
while [ $# -gt 0 ]; do
argument="$1"
case $argument in
-h|--help)
@ -60,7 +60,7 @@ if [ "$answer" = "y" ]; then
printf "%s\n" "Overwriting with random data… (round $round of $rounds)"
sudo dd bs=1M if=/dev/urandom of=$dev
done
if [ "$zero" = true ]; then
if [ $zero = true ]; then
printf "%s\n" "Overwriting with zeros…"
sudo dd bs=1M if=/dev/zero of=$dev
fi