LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   find and update an meeting date from daily schelude and send reminder to members (https://www.linuxquestions.org/questions/linux-newbie-8/find-and-update-an-meeting-date-from-daily-schelude-and-send-reminder-to-members-927954/)

smahb001 02-06-2012 03:54 PM

find and update an meeting date from daily schelude and send reminder to members
 
I am new to Linux.I need to generate a shell script to find and update the meeting event date from the daily schedule and send the reminder to all the meeting members.

my inputs are like following:
Event.data
# EventID,FirstName,LastName,MeetingDate,EmailAddress
1,Jack,Chen,02/10/12,hha001@gmail.com
2,Emily,Weiss,02/11/12,eweiss@msn.com
3,Mary,Gonzalas,02/12/12,Mgonz@gmail.com
1,Steven,Sanabria,02/10/12,Ssana@gmail.com
4,Laura,Jimenez,02/14/12,LJime@yahoo.com
4,Luis,Rodriguez,02/14/12,Lrod@yahoo.com
2,Alex,Alonso,02/11/12,Aalon@msn.com

Reminder.email
Dear __FULLNAME__:

This is a kindly remainder that meeting __EventID__ will be reschedule to __Date__.

Best Regards,
XXX

If anybody can help me to solve this or give me any hints it would be very greatful. I am just try hard but i've no clue.

Thanks

TB0ne 02-06-2012 04:14 PM

Quote:

Originally Posted by smahb001 (Post 4595389)
I am new to Linux.I need to generate a shell script to find and update the meeting event date from the daily schedule and send the reminder to all the meeting members.

my inputs are like following:
Event.data
# EventID,FirstName,LastName,MeetingDate,EmailAddress
1,Jack,Chen,02/10/12,hha001@gmail.com
2,Emily,Weiss,02/11/12,eweiss@msn.com
3,Mary,Gonzalas,02/12/12,Mgonz@gmail.com
1,Steven,Sanabria,02/10/12,Ssana@gmail.com
4,Laura,Jimenez,02/14/12,LJime@yahoo.com
4,Luis,Rodriguez,02/14/12,Lrod@yahoo.com
2,Alex,Alonso,02/11/12,Aalon@msn.com

Reminder.email
Dear __FULLNAME__:

This is a kindly remainder that meeting __EventID__ will be reschedule to __Date__.

Best Regards,
XXX

If anybody can help me to solve this or give me any hints it would be very greatful. I am just try hard but i've no clue.
Thanks

We can certainly HELP you....post what you've written and tried so far, and we can assist. We are not going to write your script for you, though...there are many bash scripting tutorials you can easily find with Google:
http://tldp.org/LDP/abs/html/

If you're looking for hints, you can use cut or awk to split the lines apart, and a while loop to read each line, until you hit the end of file. The mailx command can be used to send mail, and all of these commands have man pages.

smahb001 02-06-2012 05:20 PM

Thanks. So far i've done this.But i am not sure whether it is correct or not

files1="./Event.data"
files2="./Reminder.email"
for D in $files1;do
cut -d "," -f1 $D
done
echo " Enter event ID from the above list"
read ID
echo "Enter changed date in the format MM/DD/YY"
read date
echo "Changed date is $date
echo "selected records are:"
grep "^$ID" $files1

chrism01 02-06-2012 08:01 PM

Quote:

I need to generate a shell script to find and update the meeting event date from the daily schedule and send the reminder to all the meeting members.
which is a different requirement to enabling someone to change the file content.Which are you trying to do?
Let's do one thing at a time.

Quote:

But i am not sure whether it is correct or not
Don't just guess, actually run it ie test the script; does it do what you want, if not why not?
This would be a good addition to the top of your script
Code:

#!/bin/bash
set -xv

You should bookmark & read
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/

smahb001 02-06-2012 08:13 PM

Thanks. I am working on it.


All times are GMT -5. The time now is 08:04 AM.