fix all spellsheck
This commit is contained in:
@@ -121,6 +121,7 @@ ppn()
|
||||
# -e: select all processes
|
||||
# -o: specify custom output columns (PID and Command name)
|
||||
# grep -w: ensures exact word matching so 'bash' doesn't match 'dbash'
|
||||
# shellcheck disable=SC2009 # pgrep do not offer the -w switch
|
||||
ps -eo pid,comm | grep -w "$1"
|
||||
}
|
||||
export -f ppn
|
||||
@@ -200,8 +201,7 @@ ku()
|
||||
disp E "Usage: ku <username1 [username2 ...]>"
|
||||
return 1
|
||||
fi
|
||||
local users="$@"
|
||||
for u in $users; do
|
||||
for u in "$@"; do
|
||||
if ! id "$u" >/dev/null 2>&1; then
|
||||
disp E "User '$u' does not exist."
|
||||
return 1
|
||||
@@ -238,7 +238,8 @@ kt()
|
||||
return 1
|
||||
fi
|
||||
|
||||
local children_pids=$(pgrep -P "$parent_pid")
|
||||
local children_pids
|
||||
children_pids=$(pgrep -P "$parent_pid")
|
||||
|
||||
for pid in $children_pids; do
|
||||
kt "$pid" "$@" || break
|
||||
|
||||
Reference in New Issue
Block a user