Fixed option parsing with dashes, renamed two scripts
This commit is contained in:
parent
e680dbf08e
commit
d0204ba256
@ -147,7 +147,7 @@ while true; do
|
|||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
-?*)
|
-*)
|
||||||
echo "Error, not an option: ${1}" >&2
|
echo "Error, not an option: ${1}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
@ -22,7 +22,7 @@ while true; do
|
|||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
-?*)
|
-*)
|
||||||
echo "Not an option: ${1}" >&2 && exit 1
|
echo "Not an option: ${1}" >&2 && exit 1
|
||||||
exit
|
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)
|
Loading…
x
Reference in New Issue
Block a user