Well it's been a long time since I have used any OS besides apples and windows (raising my son). My principal would like our teachers to use UNIX as their mail system. That's not a problem, the mail system is like riding a bike you never forget. Here's my problem. She wants me to write a script that when the teachers type in the day of the week it comes back on what the lesson plans are for the day.
I want to write this in the bourne using case structure so I can actually remember what I did when I go back. I remember echo, and I know that I like if-then. I have read 3 books and checked all these forums and well, it's simply not clicking. I do not need someone to write me the program I just need a jump start to get my brain back in programming mode again. Any buyers :0). This would be sincerely appreciated.
Suggest you read the man page on case and sh. Very simple suggestion below:
#!/bin/sh
/usr/ucb/echo -n "Enter the day (default: `date +%A`) "
read whichday
if ["$whichday" -eq ""]; then
whichday="`date +%A`"
fi
case $whichday in
Sunday) cat /tmp/nowork.lp ;;
Monday) cat /tmp/Monday.lp ;;
Friday) cat /tmp/Friday.lp ;;
Saturday) cat /tmp/nowork.lp ;;
esac
Personally, I would do this in csh (don't even start) but would suggest you do it in ksh instead of bourne. More features. Once you get it, put it into a web page and cgi-script for better looks.
Note to add your normal checking - upper/lower case, numbers, ...