awk refactor of my scripts
awk is OP man - so easy to use and does a bunch of stuff all at once without having to rely on multiple pipes. It comes with essentially every distribution so you'll always have access to it.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
pgrep ".*" -l | dmenu -p "Choose process: " | sed "s/\\([0-9]*\\).*/\1/g" | xargs kill -9 $1
|
||||
pgrep ".*" -l | dmenu -p "Choose process: " | awk '{ print $1 }' | xargs kill -9 $1
|
||||
|
||||
Reference in New Issue
Block a user