Hello
I'm trying to get a script working, but I'm stuck
My script is set up to email a group of people. the email addresses are stored in a file looking like:
0 Mark
x@aastudios.co.uk
1 Tim
y@agtranslations.co.uk
2 Alan
z@breathemail.net
3 Alan
a@acdesign.freeserve.co.uk
4 Gary
bu2004@akrepro.co.uk
Thus, the email script greps for the id number (0 to 4) and them awks for the email address.
However, sometimes the grep command will get multiple lines, for example, grepping for "0" will return:
0 Mark
x@aastudios.co.uk
4 Gary
bu2004@akrepro.co.uk
this will then not work for the emailing because the awk will get two lines instead of just one.
Let us assume that we are in the situation as above, where I have to send an email to id number 4, Gary, however, my grep has given me two lines.
How can I seperate line id ="4"?
Many thanks
Hamish