mirror of
https://github.com/Hizenberg469/Makefile-tutorial.git
synced 2026-04-20 06:12:23 +03:00
created shell dir
This commit is contained in:
15
shell/getopts.sh
Normal file
15
shell/getopts.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
while getopts a:b:cd param;
|
||||
do
|
||||
case $param in
|
||||
a) echo "parameter 'a' with argument: $OPTARG"
|
||||
;;
|
||||
b) echo "parameter 'b' selected with argument: $OPTARG"
|
||||
;;
|
||||
c) echo "parameter 'c' selected (no colon, no argument)"
|
||||
;;
|
||||
d) echo "parameter 'd' selected"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
Reference in New Issue
Block a user