![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running the job continously. | rajesh08 | UNIX for Advanced & Expert Users | 6 | 10-04-2008 04:37 PM |
| Append Output to another file in Perl | Raynon | Shell Programming and Scripting | 7 | 09-03-2008 04:29 AM |
| Script should run continously | pssandeep | UNIX for Dummies Questions & Answers | 3 | 01-20-2008 11:01 PM |
| sftping continously with out breaking the connection | nilesrex | UNIX for Advanced & Expert Users | 7 | 11-08-2007 11:19 PM |
| Append output to file | ayhanne | Shell Programming and Scripting | 3 | 10-24-2007 01:30 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to append the output continously from a script
Hi All,
Am using the below script to produce some statistics. Currently it send the results to a log file and sends the contents of the log to a mail ID. Next time when it runs it erases the previous log and writes the latest output to the log file. I want the output to be appended to the script and also the script should send email only with the latest result. Please help.. Here is the script . $HOME/.profile echo "****CDR and SDR Queue****" > mg_stat.log gs_admin |grep ^Queue |awk '{print $1,$2,$3,$4}' >> mg_stat.log gs_admin |grep ^cdr |awk '{print $1,"\t\t"$2,"\t\t"$3,"\t\t"$4}' >> mg_stat.log gs_admin |grep ^sdr |awk '{print $1,"\t\t"$2,"\t\t"$3,"\t\t"$4}' >> mg_stat.log echo "name state last op busy%" >> mg_stat.log cross_stat -server|grep sdr|awk '{print $2,$7,$9,$10}' >> mg_stat.log cross_stat -server|grep cdr|awk '{print $2,$7,$9,$10}' >> mg_stat.log echo "" >> mg_stat.log echo "****CPU Usage****" >> mg_stat.log uptime >> mg_stat.log mailx -s "MG Stat" n.appandairajan@rci.rogers.com< /home/psms/mg_stat.log |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|