Improved argument parsing
This commit is contained in:
parent
755c3519df
commit
83f1367297
1 changed files with 2 additions and 2 deletions
|
@ -18,8 +18,8 @@ INPUT="/proc/mdstat"
|
||||||
DEBUG=false
|
DEBUG=false
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-r|--raid) TARGET_RAID_NAME="$2";;
|
-r|--raid) TARGET_RAID_NAME="$2"; shift;;
|
||||||
-i|--input) INPUT="$2";;
|
-i|--input) INPUT="$2"; shift;;
|
||||||
-d|--debug) DEBUG=true;;
|
-d|--debug) DEBUG=true;;
|
||||||
-?|--help)
|
-?|--help)
|
||||||
echo "Check /proc/mdstat. Arguments:"
|
echo "Check /proc/mdstat. Arguments:"
|
||||||
|
|
Loading…
Reference in a new issue