Basic scripting is done

This commit is contained in:
Hizenberg469
2024-11-30 11:20:46 +05:30
parent 1ede16f3c4
commit 04859194ac
8 changed files with 369 additions and 1 deletions

15
getopts.sh Normal file
View 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