I'm trying to extract the process id of a process using a shell command. I know how to get the line from ps using:
ps -e | grep process_name
I dont know how to further parse this output to just print the first field (i.e. the pid number). Can anyone help?