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!

how to use awk to remove lines ending with '*'

Status
Not open for further replies.

jdhahbi

Technical User
Oct 7, 2009
24
US
hi

I have a file where some lines end with '*'.
I would loke to remove those lines ending with '*'.
inFile:
a
b*
c
d*

outFile:
a
c

Thanks
 
awk '!/\*$/' /path/to/inFile >outFile

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

Part and Inventory Search

Sponsor

Back
Top