aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/tools/listuser.sh
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-02-10 13:52:52 -0500
committerJesús <heckyel@hyperbola.info>2021-02-10 13:52:52 -0500
commit7e95c3b667a1b353f8275db886203f272bfcce34 (patch)
treeaefe3b7db69ac78b83b79a70cf43401679812d20 /hyperterm/tools/listuser.sh
downloadhyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.tar.lz
hyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.tar.xz
hyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.zip
first commit
Diffstat (limited to 'hyperterm/tools/listuser.sh')
-rw-r--r--hyperterm/tools/listuser.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/hyperterm/tools/listuser.sh b/hyperterm/tools/listuser.sh
new file mode 100644
index 0000000..face1a7
--- /dev/null
+++ b/hyperterm/tools/listuser.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# List user
+function listuser() {
+ case ${LANG/_*/} in
+ es)
+ printf '%s\n' "Usuario UID Shell "
+ printf '%s\n' "----------- ----- --------"
+ awk -F':' '$3>=1000 && $3<=60000 { printf "%-12s %4d %11s\n", $1, $3, $7 | "sort -r"}' /etc/passwd
+ ;;
+ *)
+ printf '%s\n' "Users UID Shell "
+ printf '%s\n' "----------- ----- --------"
+ awk -F':' '$3>=1000 && $3<=60000 { printf "%-12s %4d %11s\n", $1, $3, $7 | "sort -r"}' /etc/passwd
+ ;;
+ esac
+}