![]() |
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 |
| Shell script for text extraction from a file | vignesh53 | Shell Programming and Scripting | 3 | 02-05-2008 08:16 AM |
| AWK extraction | harris2107 | Shell Programming and Scripting | 2 | 01-15-2008 11:44 AM |
| AWK extraction | harris2107 | Shell Programming and Scripting | 3 | 08-17-2007 05:02 AM |
| Data Extraction issue. | irehman | Shell Programming and Scripting | 5 | 04-06-2006 08:28 AM |
| Help with tar extraction! | manthasirisha | Shell Programming and Scripting | 4 | 03-17-2006 07:17 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
help with data extraction script
Hello all,
Iam newbie here and to unix programming. I have the following text file. Code:
A:Woshington,B:London,C:Paris,D:Manchester,C:Lisbon,E:Cape town. Code:
CITY1:`echo "$text" | grep "A:" |awk '{print $0 }'`
CITY2 :`echo "$text" | grep "B:" |awk '{print $0 }'`
CITY3:`echo "$text" | grep "C:" |awk '{print $0 }'`
CITY4:`echo "$text" | grep "D:" |awk '{print $0 }'`
CITY5:`echo "$text" | grep "E:" |awk '{print $0 }'`
CITY6:`echo "$text" | grep "F:" |awk '{print $0 }'`
mam |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|