I have a semi-lunatic professor that can't speak any english and has given us an assignment that requires command knowledge we have not been taught yet. Can anyone steer me towards the right direction for a shell script that needs to read a users E-Mail file and search it for specific text to pull out and load into a variables - So for example - if the file has a bunch of stuff looking like this...
[Some kind of header information here}
Some more information here,
[[header information for the first e-mail in this file]]
the e-mail body
THE LINE I"M TRYING TO GET INFORMATION FROM
some more body information
THIS LINE I WANT TO PULL THE WORD "RED" INTO A VARIABLE
some more body
[end of first e-mail]
[[header for second e-mail]]
... and so-on
The project requires me to pull user information e-mailed to this script and have the script make a new user account based on it.
I am not writing here to get an easy A, I could write this in about 5 different languages, and maybe 100000 different ways, but since this is an introductory class to unix which I know very little about, our teacher's english is so bad that no one can understand him, and there isn't a single thing about this in our text books I was hoping someone out there might be able to help me out. Mostly I need help breaking down text from a file and put key information into variables, the rest I can figure out.