grep
grep some_string file grep hypo multifastafile
grep hypothe multifastafile
grep –i some_string file
grep trap multifastafile
grep -i trap multifastafile
grep some_string file |grep some_string
grep -i trap multifastafile |grep TAXI grep -i trap multifastafile |grep TAXI |grep For
grep –v some_string file
grep -i trap multifastafile |grep TAXI |grep -v Rev
grep –i some_string file–color
grep -i trap multifastafile |grep --color TAXI grep -i trap multifastafile |grep --color TAXI |grep -i forwa --color -color works on last match
grep -c some_string file
grep 60S BS_named.gff3 –color
grep 60S BS_named.gff3 -c gives 3568
grep -n some_string file
grep 60S BS_named.gff3 -n grep -n 60S BS_named.gff3 grep -n 60S BS_named.gff3 |more
grep “>” tursiops.fa grep > tursiops.fa
grep “>” tursiops.fa -c
grep \> tursiops.fa -c grep '>' tursiops.fa
can use regular expression but not covered here - just a taste grep ^G tursiops.fa –color
^ means must be at beginning of line
grep G$ tursiops.fa –color
$ means must be at the end of the line
grep ^G[HMP] tursiops.fa –color
[] hold character classes H or M or P in second postion
grep ^G[HMPL][G] tursiops.fa –color