Hi, A script is needed which comments the second line of the file and removes ones condition is fulfilled.. For example as mentioned down, I'm checking for the free memory, when it comes to some 50MB it should the comment the '#' at second line of the file /service/run and when the free memory comes to 200 it should remove '#' killing the process or perl. The script below is incomplete..
Please do respond it urgently.. Thanks in advance
#!/bin/bash
echo RAM=`grep MemFree /proc/meminfo|tr -s [:blank:]|cut -f2 -d" "` echo SWAP=`grep SwapFree /proc/meminfo|tr -s [:blank:]|cut -f2 -d" "` echo PID=`pidof perl` if [ $RAM le= 563200 ] then wall "Free Memory is at 100" elif [ $RAM=530432 ] fi
Regards, Raghunandan
Raghunandan Rao Kanugo, System Administrator (Linux), Hyderabad, AP
__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com