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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sed question.

Status
Not open for further replies.

Cimm

Technical User
Feb 17, 2005
69
US
Just a minor problem I believe.

I know that s/ftpadm System*//g deletes lines which starts with ftpadm..

How about if I want to save whatever that is after System but delete system and everything infront of it.

Thanks
 
Why not simply this ?
s/ftpadm System//

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the reply PHV.

I want to delete everything infront of [ftpadm System], but keep whatever its after ftpadm System.

[ftpadm System] is the only thing that is common for all lines in the log file.

Thanks for the reply PHV.
 
I want to delete everything infront of [ftpadm System]
s/.*ftpadm *System//

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks alot PHV that solved it.

I allmost had it right, but i would never had figured out that you need a period infront of the .*

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top