#Basic use of grep for regular expressions #E Heppenheimer, Fall 2017 #basic syntax is: $ grep searchterm infile > outfile #For a more specific example: $ grep exon infile > outfile #will print every line that contains the word "exon" in the infile to the outfile #if you don't include "> outfile", this information will print to the terminal window #if you are searching for more than one word with grep, you need and -E flag and '' around the phrase you are looking for $ grep -E 'number of reads' infile > outfile #if you want to looks for lines that contain one of multiple possible phrases, you can use a pipe (|) to signify "or" #this will print every line that contains at least one of these phrases $ grep -E 'Identifying unique reads|Number of utilized reads' infile > outfile