Search Results

Search: Posts Made By: amit_spl
7,940
Posted By pravin27
use awk with -v option ps -aef|grep httpd|awk...
use awk with -v option
ps -aef|grep httpd|awk ' { print $2 , $5 } ' | cut -d ':' -f1 | awk -vT=`date -d '1 hour ago' "+%H"` ' $2<T {print $1}'
7,940
Posted By itkamaraj
change your two lines 1) combine the grep...
change your two lines

1) combine the grep and awk
2) use while loop instead of for loop

ps -aef | awk '/httpd/{ print $2 , $5 } ' | cut -d ':' -f1 > /root/output.txt
awk -v t="$T" '$2<t...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 06:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy