how to make pattern for grep command on linux? [closed]
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/
精彩评论