17 lines
251 B
Bash
Executable file
17 lines
251 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
POSITIONAL_ARGS=()
|
|
|
|
while getops 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";
|