LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [Help me, plz!!] Compare string in the column in the file... (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bhelp-me-plz-%5D-compare-string-in-the-column-in-the-file-773381/)

nightmare520 12-04-2009 12:58 AM

[Help me, plz!!] Compare string in the column in the file...
 
How can to solve this with Shell Script?
I have a file (data.txt)
Code:

Customer's Name | Email                | Phone No.
Mr. A          | mr.a@yahoo.com        | 01701234567
Mr. B          | mr.b@gmail.com        | 01712345678
Mrs. C          | mrs.c@hotmail.com    | 01723456789
Ms. D          | ms.d@yahoo.com        | 01709876543
Mrs. E                | mrs.e@gmail.com        | 01724567890

And i want to compare a Phone No. column.
If it was started by 0170 then send them an email with content (content4VIP.txt)..

Code:

You're a VIP member. you are donate 100USD..
else send them an email with content (content4Gold.txt)..
Code:

You're a Gold member. you are donate 50USD..
I have a big problem with the programming languages..
-----------------Thx------------------
-----------------For------------------
-------------->> Help <<--------------

pixellany 12-04-2009 06:40 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 03:16 AM.