I need to extract the PID from the file created by the command
ps -A >> myfile
PID TTY TIME CMD
29465 - 0:00 dbcd
29466 - 0:00 dbcfs
29467 - 0:00 dbcfsrun
29468 - 0:00 dbcfsrun
29469 - 0:00 dbcfsrun
grep 'dbcd' myfile > myfile2
29465 - 0:00 dbcd
How do I extract out the PID from this file, I will want to do a
kill 29465
Thanks.
ps -A >> myfile
PID TTY TIME CMD
29465 - 0:00 dbcd
29466 - 0:00 dbcfs
29467 - 0:00 dbcfsrun
29468 - 0:00 dbcfsrun
29469 - 0:00 dbcfsrun
grep 'dbcd' myfile > myfile2
29465 - 0:00 dbcd
How do I extract out the PID from this file, I will want to do a
kill 29465
Thanks.