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.
In reply to Re: Where does the 6th process come from?
by shmem
in thread Where does the 6th process come from? [SOLVED]
by karlgoethebier
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |