From 7e95c3b667a1b353f8275db886203f272bfcce34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 10 Feb 2021 13:52:52 -0500 Subject: first commit --- hyperterm/tools/listuser.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 hyperterm/tools/listuser.sh (limited to 'hyperterm/tools/listuser.sh') 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 +} -- cgit v1.2.3