![]() |
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 |
| Splitting av file in 2 at specific place based on textpattern | borgeh | Shell Programming and Scripting | 0 | 09-24-2007 07:02 PM |
| How to retrieve a particular line from a file | vinayap | UNIX for Dummies Questions & Answers | 2 | 07-11-2007 02:16 PM |
| search and retrieve previous line in file | paulsew | Shell Programming and Scripting | 2 | 02-23-2007 08:04 AM |
| how do we retrieve a line from a file in unix | lmadhuri | Shell Programming and Scripting | 2 | 02-07-2007 08:07 AM |
| Retrieve line from a file based on a value in specific column | efernandes | UNIX for Dummies Questions & Answers | 1 | 01-27-2007 11:04 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
(cont) Retrieve line from a file based on a value in specific column
HI,
Your help was great: awk -F":" '$5 ~ /^P/{print }' file I would like to know what changes need to be done to this line code, so that I can put it in a shell script and call it as the example below. example: countries that start with chacater 'P' > country P Result: 2006:John:Student:Football:Portugal:Cinema 2006:James:Engineer:Basket:Poland:Theatre Thanks Elio |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|