Sponsored Content
Full Discussion: at reminder script
Homework and Emergencies Homework & Coursework Questions at reminder script Post 302560448 by csharp100 on Thursday 29th of September 2011 11:27:49 PM
Old 09-30-2011
at reminder script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:
Hi everyone, The script I did below works just fine. My problem is when the script is executed, I receive 2 emails. One is from the script and the other is from our Sun OS system named admiral. The Sun os is ver. 5.10. The mail message I receive is:
"Your "at" job on admiral
"/var/spool/cron/atjobs/1317352641.a"
produced the following output:
stty: : Inappropriate ioctl for device
stty: : Inappropriate ioctl for device
I cannot determine your terminal name. No reply possible.
Warning: You have your terminal set to "mesg -n". No reply possible."

I am trying to figure out what "stty: :In appropriate ioctl for device" means. Can anyone help? Thanks!


2. Relevant commands, code, scripts, algorithms:

at command

3. The attempts at a solution (include all code and scripts):
Code:
# Alertme.p1 program, version 0.3
# Author - Clint Sharp
echo "\nEnter your reminder message.
When finished, enter a period (.) at
the beginning of a line and press <ENTER>.
(Or press Ctrl-C to exit the script)\n"
while :
do
        read MESSAGE
        if [ "$MESSAGE" = "." ]
        then
                break
        else
                echo $MESSAGE >> ~/Msgs/message.$$
        fi
done
echo "\nEnter the time and day you want to
receive the message, for example:
0815am Jun 14
8:15am Jun 14
now + 1 day
5 pm Friday
Then press <ENTER>\n"
read TIME 
echo "\nAt $TIME mail or write $LOGNAME ~/Msgs/message.$$\n"
at $TIME << !!
write $LOGNAME < ~/Msgs/message.$$ || mail $LOGNAME < ~/Msgs/message.$$
rm -f ~/Msgs/message.$$
exit 0


4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
UMSL, St Louis, MO, USA, Antonogli, cs2750

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
 

2 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Reminder script not working...

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: We have been tasked to write an at reminder script that will write or echo a message to more than one user. What... (11 Replies)
Discussion started by: csharp100
11 Replies

2. OS X (Apple)

A simple reminder script for beginners to shell scripting.

(Apologies for any typos.) Well hands up those who have been in the following situation(s):- Your partner, (in my case the missus), sees that you are messing with your machine and says something like, "can you keep an eye on the dinner, I am going out shopping", and you look up glazed eyed... (3 Replies)
Discussion started by: wisecracker
3 Replies
profile(4)                                                         File Formats                                                         profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.10 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy