For example, test.data is like this:
ENSG00000007372 ENSG00000109911 ENSG00000121690
ENSG00000007372 ENSG00000149100 ENSG00000170959
ENSG00000043355 ENSG00000175198 ENSG00000102452
ENSG00000172845 ENSG00000115840 ENSG00000091428
ENSG00000172845 ENSG00000138430 ENSG00000128708
ENSG00000103449 ENSG00000103494 ENSG00000121274
ENSG00000104313 ENSG00000182674 ENSG00000140396
ENSG00000117707 ENSG00000136643 ENSG00000143499
ENSG00000121297 ENSG00000105176 ENSG00000178904
>grep ENSG00000138430 test.data
ENSG00000172845 ENSG00000115840 ENSG00000091428
while,
>grep ENSG00000138430 test.data -B1 -A3
ENSG00000172845 ENSG00000115840 ENSG00000091428
ENSG00000172845 ENSG00000138430 ENSG00000128708
ENSG00000103449 ENSG00000103494 ENSG00000121274
ENSG00000104313 ENSG00000182674 ENSG00000140396
ENSG00000117707 ENSG00000136643 ENSG00000143499
No comments:
Post a Comment