using bash to find the pid of a process called "name"
how would one use a bash script to get the pid of a process by using its name?
i need to use the number in a script, so using ps -A|grep thename wont do any help? |
ps -A | grep <name> | awk '{print $1}'
for example ... Cheers, Tink |
Or even simpler... pidof <name> ...
|
See, I learn something new every day :)
Thanks for that one! Cheers, Tink |
All times are GMT -5. The time now is 05:10 PM. |