![]() |
|
|
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 |
| Command to find out "count" of running process ? | MITESH KOTHARI | Shell Programming and Scripting | 4 | 04-01-2008 04:27 AM |
| running command "top" in cron | freddy1228 | UNIX for Dummies Questions & Answers | 3 | 03-18-2008 04:43 PM |
| Running command "md5" on remote host not working. | ynilesh | UNIX for Advanced & Expert Users | 1 | 02-01-2008 08:15 AM |
| communicating wth another user aside from "wall" and "write" | Deanne | Shell Programming and Scripting | 6 | 05-11-2007 06:43 AM |
| Unix "at" / "Cron" Command New Problem...Need help | Mohanraj | UNIX for Dummies Questions & Answers | 3 | 01-26-2006 08:08 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Running "wall" command from cron
Hello,
Ive written a little script that broadcasts a message if certain criteria are met. The script works fine when I run it. I entered it in the crontab to run every hour on the hour. The script executes, but the wall command doesnt seem to be executing correctly. I only have this problem when running the script from the crontab. My script is below: #!/bin/sh # This script checks for core files and broadcasts a message # to all users if any are found. # Created 02/25/2003 by Adam if [ ! -f /tmp/fndcore.log ] then touch /tmp/fndcore.log #Creates log file if it doesn't exist fi # Check size of log file before updating it SIZE1=`cat /tmp/fndcore.log | wc -c` find / -name core -print > /tmp/fndcore.log #Update log file # Check size of log file after updating it SIZE2=`cat /tmp/fndcore.log | wc -c` if [ $SIZE2 != 0 ] && [ $SIZE1 != $SIZE2 ] then cat /tmp/fndcore.log | wall #Broadcast message fi Any ideas as to why the wall command isnt executing correctly when the script is run through cron? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|