Originally Posted by TigerDragon
It is done
Thank you very much
God bless you
Originally Posted by Jesca Hagaze
You need to not use vi to create a file called "calendar." You need to run a command:
crontab -e
and paste what redhead gave you in, then save it.
Originally Posted by TigerDragon
It is done
Thank you very much
God bless you
> man crontab
Meaning you need to tell crontab to run it, it is not a shell program or anything..SYNOPSIS
crontab [ -u user ] file
Don't worry Ma'am. We're university students, - We know what We're doing.
'Ruiat coelum, fiat voluntas tua.'Datalogi - en livsstil; Intet liv, ingen stil.
If you are editing your own crontab entry, you only need "crontab -e" to do it. The -u user option is for addressing other users' crontab entries, and is used by root.
I need to set a daily, weekly and monthly appointment using IF statement and while loop. I tried the following script by creating a daily1.dat file in a root directory, it run the command to the foreground process.Originally Posted by Jesca Hagaze
#!bin/bash
#comment
while i=0
do
grep 'date +%H:%M' daily1.dat
done
Based on the above schedule/appointment, can I use it to set Personal calendar using shell script i.e using the while loop statement.Originally Posted by Jesca Hagaze
I created this shell script so that it will remind/ give an alert all users From Monday - Friday at 8:15 that "Good Morning".
#!/bin/bash
$cat > appointment
#
#
Take input()
{
appointment=0
clear
echo "Daily Appointment"
read appointment
if [! -f $appointment]; then
echo "Appointment does not exists, creating $appointment database"
echo "Appointment Application database file" > $appointment
fi
echo "Start reading Appointment schedule" > /etc/schedular.$$
while:
do
echo -n "Good Morning"
read na
echo -n "8:15"
read ti
echo -n "is data okey (y/n)?"
read ans
if [$ans=y -o $ans=Y]; then
recno = "expr $recno + 1
echo "$rechno. $na $ti" >> /etc/schedular.$$
fi
done
}
Error message
./appointment: line 5: syntax error near unexpected token `('
./appointment: line 5: `Take input()'
Is this the right way to write a shell script?, what can I do to make it function properly.
Thank you for your respons
Can some mod be kind enough to move this to Scripting-Programming forum. Thanks.
I am learning, and you are the one to give me assistance. Thank you and be blessed.Originally Posted by Compunuts
Bookmarks