From e532c0c89b6fc69ab99d2c9a739d13d5a9570b3f Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Wed, 24 Aug 2022 17:50:34 +0530 Subject: fix in if statement using bashism- var requires double quotes --- .scripts/pidkillall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts/pidkillall') diff --git a/.scripts/pidkillall b/.scripts/pidkillall index afbf007..1ebc38f 100755 --- a/.scripts/pidkillall +++ b/.scripts/pidkillall @@ -4,6 +4,6 @@ psout=$(ps -u $USER -o pid,%cpu,%mem,comm | sed -n '1!p' | sort -b -k2 -r| cut - //uniq without piping into sort before with the help of awk killall $psout 2>/dev/null && -[ -n $psout ] && dunstify "Terminated all processes Successfully" "$psout was killed" -i skull +[ -n "$psout" ] && dunstify "Terminated all processes Successfully" "$psout was killed" -i skull -- cgit v1.2.3