![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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 |
|||
| Google The UNIX and Linux Forums |