开发者

Grep expressions c

开发者 https://www.devze.com 2023-02-08 18:57 出处:网络
I am facing problem with getting regular expression for grep for these patterns:- 1).what words c开发者_Python百科ontain but do not begin with the string \'ps\'.

I am facing problem with getting regular expression for grep for these patterns:-

1).what words c开发者_Python百科ontain but do not begin with the string 'ps'.

2)What option has a description with the words "hide entries". (next line that contains some text after specified word.

I googled but didnt find it. Any suggestions will be appreciated. Thanks


  1. As grep deals with lines, you must process the source to have each word on its own line, then grep. If efficiency is not a question you can grep "ps" and pipe it to grep -v "^ps".

  2. I don't understand about hiding the entries. Can you provide an example of what you need from this option?


You could also use grep -P '^(?!ps)'.

0

精彩评论

暂无评论...
验证码 换一张
取 消