Hello everybody,
I need to get the process names 'tt' in a script. For this reason I was doing:
ps -ef |grep tt |grep -v tt | awk '{print $9}'
but I have a problem because if the process has been started today the process name is in 8th column, but if it has been started another day before this value belongs in the 9th column. ¿How can I get the process names independently of when it has been started?
For example:
aaaa 737370 2355264 0 08:40:27 - 0:00 tt_ujmyhn
bbbb 995376 1 0 Oct 10 - 0:11 tt_qazwsx
bbbb 1245242 1 0 Oct 10 - 0:16 tt_edcrfv
I need to get: tt_ujmyhn, tt_qazwsx and tt_edcrfv
Thank you very much.
I need to get the process names 'tt' in a script. For this reason I was doing:
ps -ef |grep tt |grep -v tt | awk '{print $9}'
but I have a problem because if the process has been started today the process name is in 8th column, but if it has been started another day before this value belongs in the 9th column. ¿How can I get the process names independently of when it has been started?
For example:
aaaa 737370 2355264 0 08:40:27 - 0:00 tt_ujmyhn
bbbb 995376 1 0 Oct 10 - 0:11 tt_qazwsx
bbbb 1245242 1 0 Oct 10 - 0:16 tt_edcrfv
I need to get: tt_ujmyhn, tt_qazwsx and tt_edcrfv
Thank you very much.