开发者

how to make pattern for grep command on linux? [closed]

开发者 https://www.devze.com 2023-02-21 01:44 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I hav to grep a file whos content is as follw:

bla bla bla this is not requred

above is my simple text file content. from which i need to get each line containing and line nex开发者_开发技巧t to this line. that is in above case i need first 2 lines. how i can get them using grep command?


I think you mean

grep -A1 wekobj inputfile

If not, you mean

man grep

and you should go over to https://unix.stackexchange.com/

0

精彩评论

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