Re: *really* shortest match in awk - possible?
- From: Tomasz Chmielewski <tch@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Nov 2007 22:15:52 +0100
Tomasz Chmielewski schrieb:
Yes, everything is possible in awk, but not for mere mortals, right?
I have a mbox file (see below for an example) with advertisements attached to the end of every message. I would like to remove these ads.
Ads are placed between -------- and _________ characters.
I tried using something like:
awk '/^----/,/^____/{next}{print}'
but it eats up a bit too much, and one could argue if it's really the shortest match.
Thanks a lot for all answers in this thread! ;)
--
Tomasz Chmielewski
http://wpkg.org
.
- References:
- *really* shortest match in awk - possible?
- From: Tomasz Chmielewski
- *really* shortest match in awk - possible?
- Prev by Date: Re: pulling out blocks of data from file
- Next by Date: Re: pulling out blocks of data from file
- Previous by thread: Re: *really* shortest match in awk - possible?
- Next by thread: Re: *really* shortest match in awk - possible?
- Index(es):
Relevant Pages
|