![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple input field Separators in awk. | kinksville | Shell Programming and Scripting | 4 | 04-25-2008 06:12 PM |
| I need help counting the fields and field separators using Nawk | scrappycc | Shell Programming and Scripting | 3 | 02-06-2008 11:47 PM |
| Awk Multiple Field Separators | Tonka52 | Shell Programming and Scripting | 7 | 04-07-2004 10:37 PM |
| field delimiter with a space or more | uphamtn | UNIX for Dummies Questions & Answers | 3 | 05-15-2003 05:22 PM |
| How do you represent a field delimeter that is a space??? | TRUEST | UNIX for Dummies Questions & Answers | 1 | 05-04-2003 10:01 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Multiple field separators in awk? (First a space, then a colon)
How do I deal with extracting a portion of a record when multiple field separators are involved.
Let's say I have: Mike Harrington;(555) 555-5555:250:100:175 Christian Dobbins;(555) 555-2358:155:90:201 Susan Dalsass;(555) 555-6279:250:60:50 Archie McNichol;(555) 555-1348:250:100:175 Jody Savage;(555) 555-1278:15:188:150 How can I print only last names beginning with a D? I just want the Dalsass and Dobbins to print. This... awk -F: '$1 ~ / D/ {print $1}' donors.txt just gives me both names. How can I eliminate the first names from printing? Thanks! Last edited by doubleminus; 04-25-2008 at 03:27 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|