Home > Enterprise >  grep- Extract text present in one document but absent in other
grep- Extract text present in one document but absent in other

Time:02-01

I want to do some kind of present-absence analysis. I have three different protein files and I want to identify/extract proteins (they are in simple text form) that are present in one file and absent in others and vice versa.

I assume I can do it using 'grep' command but I am unsure about the specifics. Your help would be highly appreciated. Thanks!

CodePudding user response:

You can use the pipeline operator to join the commands:

cat <file_name> | grep <text you want to identify>

e.g.:

cat file_1.txt | grep "text"
  • Related