I'm new to shell scripting and here is my problem:
I want to store PID's from output of
kill $1 $2 $3
Found 3 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!
set 'airmon-ng check'
set `airmon-ng check`
for (( i=0; i<=n; i++ ))
airmon-ng check | egrep -o '\b[0-9]+\b' | xargs kill
egrep is grep with extended regular expressions (like
-o says to extract only the matching parts,
\b matches word boundaries so you don't get any numbers accidentally occuring in process names or something,
[0-9]+ matches one or more decimal digit,
xargs kill passes all the matches as arguments to the
Note that parsing output intended to be read by humans might not always be a good idea. Also, just killing all those processes doesn't sound too smart either, but proper usage of airocrack is beyond this question.