17 lines
251 B
Bash
17 lines
251 B
Bash
|
#!/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";
|