in reply to Where does the 6th process come from? [SOLVED]
The grep.
- my $procs = qx(ps aux | grep [p]erl | wc -l); + my $procs = qx(ps aux | grep [p]erl | grep -v grep | wc -l);
update: Scratch that. The [p] avoids the grep to be included.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Where does the 6th process come from?
by Anonymous Monk on Apr 22, 2017 at 15:27 UTC |