JAVA-20220 Added suffix -modules to aws-lambda, clojure, terraform, linux-bash
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
### Relevant Articles:
|
||||
|
||||
- [How to Use Command Line Arguments in a Bash Script](https://www.baeldung.com/linux/use-command-line-arguments-in-bash-script)
|
||||
- [Concatenate Two Strings to Build a Complete Path in Linux](https://www.baeldung.com/linux/concatenate-strings-to-build-path)
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
while getopts u:a:f: flag
|
||||
do
|
||||
case "${flag}"
|
||||
in
|
||||
u) username=${OPTARG};;
|
||||
a) age=${OPTARG};;
|
||||
f) fullname=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
echo "Username: $username";
|
||||
echo "Age: $age";
|
||||
echo "Full Name: $fullname";
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Username: $1";
|
||||
echo "Age: $2";
|
||||
echo "Full Name: $3";
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
i=1;
|
||||
for user in "$@"
|
||||
do
|
||||
echo "Username - $i: $user";
|
||||
i=$((i + 1));
|
||||
done
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
i=1;
|
||||
j=$#;
|
||||
while [ $i -le $j ]
|
||||
do
|
||||
echo "Username - $i: $1";
|
||||
i=$((i + 1));
|
||||
shift 1;
|
||||
done
|
||||
Reference in New Issue
Block a user