fi
}
e() {
- printf "dryrun: %s\n" "$*"
+ if $dryrun; then
+ printf "dryrun: %s\n" "$*"
+ fi
}
c=$cbase/$service # c for command file path base
-if $dryrun; then
- e "c=$c"
-fi
+e "c=$c"
glob="${c}[0-9]*"
arr=($glob); file="${arr[0]}"; [[ $glob != "$file" ]] || file=
-if [[ $dryrun && $file ]]; then
+if [[ $file ]]; then
e "file=$file"
fi