The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
output of command rup kiranrasane UNIX for Advanced & Expert Users 1 03-27-2008 07:31 AM
Dig command output? sujathab UNIX for Dummies Questions & Answers 1 01-21-2008 06:54 AM
ls command output arsheshadri AIX 1 08-20-2007 03:23 AM
Output of ps command vibhor_agarwali UNIX for Dummies Questions & Answers 15 06-20-2007 11:23 PM
Output command berty007 Shell Programming and Scripting 4 11-29-2002 02:27 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-07-2008
Registered User
 

Join Date: May 2008
Posts: 9
command runs, no output

I have a script that searches for specific information from log files.

#!/bin/sh
sed -n '/*C/,/END/p' /sn/log/OMlog* > crit.out
sed -n '/REPT INITIALIZATION/,/err:/p' /sn/log/OMlog* > switchcc.out
./start.awk /sn/log/OMlog* > ARs.out
./end.awk /sn/log/OMlog* > ARe.out
cat crit.out switchcc.out ARs.out ARe.out > Audit.out


ideally, it will create the files "crit.out" and "switchcc.out" with no entries in them and it does.
problem is that there is no indication in "Audit.out" that "crit.out" and "switchcc.out" were run without errors.
ideally, I would like something like "crit.out ran successfully" and a time stamp

any ideas would be appreciated,
Al
Reply With Quote
Forum Sponsor
  #2  
Old 05-07-2008
Registered User
 

Join Date: May 2008
Posts: 9
i rewrote the script adding a line and now it works the way I want it to:


#!/bin/sh
sed -n '/*C/,/END/p' /sn/log/OMlog* > crit.out
sed -n '/REPT INITIALIZATION/,/err:/p' /sn/log/OMlog* > switchcc.out
./start.awk /sn/log/OMlog* > ARs.out
./end.awk /sn/log/OMlog* > ARe.out
ls -l | awk '$5 < 1 {print $9," last successful "$6, $7," "$8" file size = 0"}'
> zero.out
cat zero.out crit.out switchcc.out ARs.out ARe.out > health.report.txt
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0