Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sed - delete until match every line 1

Status
Not open for further replies.

moria6

MIS
Jul 11, 2000
30
0
0
US
I would like to delete chars from the start of the line until pattern match (in this case the word "Local") in every line.

I know how to delete 1st "n" chars and how to delete a pattern but not how to combine the two.

Any help much appreciated!


maurie
 
A starting point:
sed 's!.*Local!!' /path/to/input > output

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That works perfectly!

Thank you!!!


maurie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top