![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get lines with multiple values at a position | deepakgang | Shell Programming and Scripting | 9 | 03-27-2008 01:23 AM |
| unable to filter out blank lines ^$ matches nothing | venkatkk | UNIX for Advanced & Expert Users | 5 | 02-08-2008 07:27 AM |
| Extract if pattern matches | Raynon | Shell Programming and Scripting | 20 | 10-29-2007 01:44 AM |
| Select matches between line number and end of file? | Jerrad | Shell Programming and Scripting | 4 | 05-24-2006 04:50 AM |
| Search file for pattern and grab some lines before pattern | frustrated1 | Shell Programming and Scripting | 2 | 12-22-2005 12:41 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to select lines in unix matches a pattern at a particular position
I have huge file. I want to copy the lines which have first character as 2 or 7, and also which has fist two characters as 90. I need only these records from file. How I can acheive this. Can somebody help me.....
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
egrep "^[27]|^90" filename
|
|
#3
|
|||
|
|||
|
thanks. It worked...
|
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|