There are 3 processes. I have to find the "count" of running process in current directory.
# named ../sample
And:
[root@sp3 sample]# ps -eaf|grep perl
root 14104 1 58 08:39 ? 03:31:34 perl example1.pl
root 17441 1 41 09:09 ? 02:17:24 perl example2.pl
root 24543 1 0 Jul05 ? 00:00:00 perl sample.pl
[root@sp3 sample]#
The result I have to return is 3.
I have currently in sample directory and I have to count the number of process in same directory
Please post any solution.