I have a file with a similar format…
16:28 asdfasdf
16:29 4398upte
16:30 34liuthr
16:31 34tertio
How can I use SED to print out every line including and after the line with "16:30"?
The result would be…
16:30 34liuthr
16:31 34tertio
Right now, I am using sed as follows, but I have to manually find the first line's line number e.g. "562697":
sed -n '562697,$p'
Best Answer
Addresses in
sed
can be either line numbers or patterns. Try this:If the pattern contains a
/
, you can escape it with a\
. For example, to search for16/30
instead of16:30
, try this: