Fixed option parsing with dashes, renamed two scripts
This commit is contained in:
@@ -147,7 +147,7 @@ while true; do
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-?*)
|
||||
-*)
|
||||
echo "Error, not an option: ${1}" >&2
|
||||
exit 1
|
||||
;;
|
||||
|
@@ -22,7 +22,7 @@ while true; do
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-?*)
|
||||
-*)
|
||||
echo "Not an option: ${1}" >&2 && exit 1
|
||||
exit
|
||||
;;
|
||||
|
4
lsusers
4
lsusers
@@ -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
4
lsusers.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# List all users on the system
|
||||
|
||||
sort --unique <(awk -F ':' '{print $1}' < /etc/passwd)
|
Reference in New Issue
Block a user