I have a file process.txt
I wanted to just grab data in "process" column.
Name process process_id status
Adminserver adminserver 22669 Running
Browser Engine browserengine 22846 Running
Cache Manager cachemanager 22740 Running
CG Log Dispatcher cglogdispatcher 22905 Running
Clarity clarity_webcluster 22950 Running
Query Completion Server completionserver 22782 Running
So I did this, but the problem is that I have to keep on piping to perl to get rid of spaces as long as there are in "Name" column so that awk can know what is in $2.
$ cat stuff | perl -pe 's,\ ,,' | perl -pe 's,\ ,,' | awk '{print $2}'
adminserver
browserengine
cachemanager
cglogdispatcher
clarity_webcluster
completionserver
How would you resolve this?