Hi
ca any one give clear idea on the below command
let say
PROG=invexe ( invexe is a process )
ps -ef | grep $PROG | grep -v grep|awk -F"|" '{print $9}'
By using the above command I tried to find out the above process name it give some unexpected result. What I believe that when we enter "ps -ef" command we get the values like ...
dear frnd
for example say
root 0 0 0 Apr 06 ? 4:11 sched
in the above example the delimiter is "blank space", so there is no point in using awk -F, when the delimiter or the space between two fields is other than blank space, say it is "|", then we have to give as awk -F"|"
as u said when using $9, ur getting the process name.... see exactly it is the 9th field only
root 0 0 0 Apr 06 ? 4:11 sched
1 2 3 4 5 6 7 8 9 field names in awk
i hope u get clarified, if not plz reply
- manikumar