summaryrefslogtreecommitdiff
path: root/pf
diff options
context:
space:
mode:
authorDavid Wührer <def@gmx.at>2024-05-18 21:04:34 +0200
committerDavid Wührer <def@gmx.at>2024-05-18 21:04:34 +0200
commit77cfffee6177fb0421fa0fce15d6a1875bde4816 (patch)
tree251428cdd482ea50cfb019dbd3c3bafd79d2fd14 /pf
parent75b23ce1ff0daab363725a2a5755ea80bbeaa68e (diff)
manuals, sum-down, radix
Diffstat (limited to 'pf')
-rwxr-xr-xpf38
1 files changed, 0 insertions, 38 deletions
diff --git a/pf b/pf
deleted file mode 100755
index 0358689..0000000
--- a/pf
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-set -ue
-
-get_parent () {
- ps hoppid p$1
-}
-
-get_children () {
- ps hopid --ppid "$1"
-}
-
-get_ancestors () {
- case $1 in
- 0|1|'') :
- ;; *) get_ancestors $(get_parent $1)
- esac
- echo "$1"
-}
-
-get_descendents () {
- for c in $(get_children "$1")
- do echo "$c"
- get_descendents "$c"
- done
-}
-
-declare -i p
-for p in "$@"
-do
- [[ $p -ne 0 ]] && {
- get_ancestors "$p"
- get_descendents "$p"
- } | {
- readarray -t pids
- ps -Hf "${pids[@]}" | sed "/^[^ ]* *$p /s/.*/&/"
- }
-done