![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I read mail in /var/spool/mail? | mojoman | UNIX for Dummies Questions & Answers | 3 | 12-05-2008 04:48 PM |
| How do I read/find/replace fields in a csv datafile? | MrCarter | UNIX for Dummies Questions & Answers | 9 | 06-20-2008 11:15 AM |
| How to read and compare multiple fields in a column at the same time | ahjiefreak | Shell Programming and Scripting | 1 | 06-19-2008 12:08 PM |
| script to read from mail | misenkiser | Shell Programming and Scripting | 0 | 10-03-2006 09:07 AM |
| To Read a text file using shell Programming | sandytul | UNIX for Dummies Questions & Answers | 1 | 04-11-2001 12:15 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
KSH Programming to read and mail fields
I have a file with the following values:
File name à a.log (bulk file with 100+ lines with the similar format) aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii| aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii| aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii| aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii| aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii| aaaa|bbbb|cccc|dddd|eeee|ffff|gggg|hhhh|iiii| My ksh script should do the following: 1. Open the file 2. Read the file and grep ‘gggg’ field from the last 2 lines 3. Send it to a maillist Please let me know the basic syntax of how to do this. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|