Here is an awk line I have in a bigger script that checks to see if nimsh process is running and does couple other things based on the output and runs on all servers.
ps -ef|grep -i nimsh|awk '{print $9}' and I am expecting output to be "/usr/sbin/nimsh"
I find that on some servers because of discrepancy in the 5th field(may in some servers and timestamp in others) , my nimsh becomes 8th or 9th field.
How can i write a statement so that it yields /usr/sbin/nimsh on all servers?