From 92cfaebb66deee9369d3a3b62cd6eab1031899d0 Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Wed, 17 Sep 2025 12:05:42 -0400 Subject: [PATCH] Added an argument shift and simplified conditional case --- zfs/zfs-clean.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zfs/zfs-clean.sh b/zfs/zfs-clean.sh index 2991e76..234ab09 100644 --- a/zfs/zfs-clean.sh +++ b/zfs/zfs-clean.sh @@ -9,7 +9,9 @@ if [ -z "$1" ]; then exit 1 fi -if ! [ -z "$1" ] && [ "$1" == "upgrades" ]; then +if [ -n "$1" ] && [ "$1" == "upgrades" ]; then + shift + while getopts "r:" opt; do case "$opt" in r) REGEX=${OPTARG};;