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!

Filtering out text

Status
Not open for further replies.

123tips

Technical User
Nov 13, 2007
3
US
I am a newbee.

I want to filter out text from lines in a file. Shold I use sed or grep? How do you do this? Here is the file:

table.tbl-arc(table.tbl)
period.tbl-arc(period.tbl)

On each line, I want to filter out everytning from the - to the end of the line so that my output is:

table.tbl
period.tbl

Thanks!




 
man sed

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top