Hi, I'm having some problems getting the output of a shell script into my
n/a message. 

I have a script called until.sh which resides in my home directory.

I put |until.sh in the n/a message.

When users read my n/a message nothing is displayed and on my end "[WRN]
until.sh returned abnormally: exit code 65535" is displayed in the log. 

The script works fine when ran in the shell.

Below is my script.

#!/bin/sh
# usage: count time until specified day

HOUR_F="17"
DAY_F="98"

SEC_I=`date +%S`
MINUTE_I=`date +%M`
HOUR_I=`date +%k`
DAY_I=`date +%j`

DAY=`expr $DAY_F - $DAY_I`

if [ $HOUR_I -lt $HOUR_F ]
then
HOUR=`expr $HOUR_F - $HOUR_I`
else
HOUR=`expr $HOUR_F - $HOUR_I + "24"`
fi

MINUTE=`expr "59" - $MINUTE_I`

SEC=`expr "59" - $SEC_I`

echo "There are $DAY Days, $HOUR Hours, $MINUTE Minutes, and $SEC Seconds
until classes are over!"

exit



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
LICQ-Main mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-main

Reply via email to