[PLUG] grep question
Felix Lee
felix.1 at canids.net
Sat Aug 2 22:03:01 UTC 2003
"Steven Raymond" <stever at woo-hoo.com>:
> How do I make grep output all lines of a file, after the first ocurrance
> of a given text?
> Say I have a log file that starts on July 1 and ends on August 5. I
> simply want to output the file, but beginning on July 15, for example.
Use sed instead.
sed -n -e '/2003-07-15/,$ p' logfile
which means:
for every line between
the first line that matches /2003-07-15/
and $ (the last line)
print the line
--
More information about the PLUG
mailing list