var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: bash script read text file
I am trying to read from a text file that i create using bash
ps -ef |grep httpd > tempFile
I want to be able to read the output from tempFile, look for pid and kill that pid using killall -9 <pid>
If it is possible, how?
root 8711 1 0 15:02 ? 00:00:00 /usr/local/apache2/bin/httpd
nobody 8712 1 0 15:02 ? 00:00:00 /usr/local/apache2/bin/httpd
nobody 8713 1 0 15:02 ? 00:00:00 /usr/local/apache2/bin/httpd
Last edited by pranav610; 02-20-04 at 16:39.
while read user pid filler
killall -9 $pid
done < tempFile
Thank you. Will try it out