bash - Remove previous line to a match string? -


How can I remove the last line of a match pattern?

or

Contrast:

  sed -n '/ pattern / {g; 1! P;}; H ' 

You can return the file and then return the line after the matte pattern (Which is simple), and then return the result, here is the code:

  tail-r | SAD / Pattern / {n; D;} 'tail-r  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -