![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| how to read record by record from a file in unix | raoscb | UNIX for Dummies Questions & Answers | 1 | 05-16-2008 06:30 AM |
| splitting a record and adding a record to a file | rsolap | Shell Programming and Scripting | 1 | 08-13-2007 01:58 PM |
| an hour less in 24 hour system | bobo | UNIX for Dummies Questions & Answers | 3 | 10-23-2006 11:55 AM |
| Run job for a period of time | cooldude | Shell Programming and Scripting | 5 | 03-06-2006 01:53 PM |
| Timeout period | Nadeem Mistry | UNIX for Dummies Questions & Answers | 4 | 08-15-2001 09:55 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
record wc -l over 24 hour period
I need to keep track of this output
echo "dis chs(*)" | runmqsc | grep RUNNING | wc -l I need to record that count once an hour 24 hours a day and write to a file with the date and time it was run. Any idea on how to do this. |
|
||||
|
wait, im not following the "echo date". Wont this output just "date".
And if I do another pipe i.e. echo "dis chs(*)" | runmqsc | grep RUNNING | wc -l | date Fri Dec 9 11:21:08 EST 2005 I dont get the wc -l any ideas? |
|
||||
|
The "date" should be a separate statement before you command. so it would look like:
Code:
#!/usr/bin/ksh
while true
do
date
echo "dis chs(*)" | runmqsc | grep RUNNING | wc -l
# Sleep for one hour
sleep 3600
done
|
|
||||
|
Quote:
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|