Fixed option parsing with dashes, renamed two scripts

This commit is contained in:
Eric Torres 2018-09-15 02:40:20 -07:00
parent e680dbf08e
commit d0204ba256
5 changed files with 6 additions and 6 deletions

View File

@ -147,7 +147,7 @@ while true; do
shift
break
;;
-?*)
-*)
echo "Error, not an option: ${1}" >&2
exit 1
;;

View File

@ -22,7 +22,7 @@ while true; do
shift
break
;;
-?*)
-*)
echo "Not an option: ${1}" >&2 && exit 1
exit
;;

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# List all users on the system
sort -u <(awk -F ':' '{print $1}' < /etc/passwd)

4
lsusers.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# List all users on the system
sort --unique <(awk -F ':' '{print $1}' < /etc/passwd)