mirror of
https://github.com/eepykate/fet.sh.git
synced 2026-11-17 19:30:18 +00:00
Change method of printing any argument given, less hard-coded
This commit is contained in:
1 parent
7e43f12610
commit
3c1b991bc2
1 file changed
+9
-7
@@ -24,18 +24,20 @@ while [ ! "$term" ]; do
|
|||||||
ppid=$(ppid "$ppid")
|
ppid=$(ppid "$ppid")
|
||||||
done
|
done
|
||||||
|
|
||||||
## WM
|
## WM/DE
|
||||||
# requires the WM to include 'wm' or 'monad' (for you leon)
|
|
||||||
pg() {
|
pg() {
|
||||||
|
unset ab var
|
||||||
# i hate myself for this
|
# i hate myself for this
|
||||||
[ $# = 1 ] && set -- $1 $1 $1 $1 $1
|
for i in "$@"; do
|
||||||
ab=
|
var="${var:+$var|}*$i*"
|
||||||
|
done
|
||||||
for i in /proc/[0-9]*; do
|
for i in /proc/[0-9]*; do
|
||||||
ab="$ab ${i##*/}"
|
ab="$ab ${i##*/}"
|
||||||
read -r a < "$i"/comm
|
read -r a < "$i"/comm
|
||||||
case $a in
|
# this was sadly the better option...
|
||||||
*$1*|*$2*|*$3*|*$4*|*$5*) echo "$a" "${i##*/}"; break;;
|
eval "case \$a in
|
||||||
esac
|
$var) echo \"\$a\" \"\${i##*/}\"; break;;
|
||||||
|
esac"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user