LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2012, 03:54 PM   #1
smahb001
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Rep: Reputation: Disabled
Angry 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
 
Old 02-06-2012, 04:14 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,484

Rep: Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970Reputation: 3970
Quote:
Originally Posted by smahb001 View Post
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.
 
Old 02-06-2012, 05:20 PM   #3
smahb001
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
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
 
Old 02-06-2012, 08:01 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,286

Rep: Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347Reputation: 2347
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/
 
Old 02-06-2012, 08:13 PM   #5
smahb001
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks. I am working on it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to find modified date and last accessed date of any file. parasdua Linux - Newbie 6 04-22-2008 09:59 AM
LXer: More on the OOXML Ballot Resolution Meeting [Updated Daily] LXer Syndicated Linux News 0 03-06-2008 05:50 PM
Advice? Best way to move files daily to a daily "date" named directory ziphem Linux - Newbie 2 04-15-2007 08:03 AM
guess the date for the registered members plateau DrOzz General 17 03-12-2004 02:01 PM


All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration