Hdi2u S21

From wiki
Revision as of 22:37, 19 April 2017 by Rf (talk | contribs) (Created page with "= Grep = * grep stands for "global regular expression print" * you use this command to search for text patterns in a file, for example, Linux's mini-dicitonary. grep "adge"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Grep

  • grep stands for "global regular expression print"
  • you use this command to search for text patterns in a file, for example, Linux's mini-dicitonary.
grep "adge" /usr/share/dict/words
  • regular expressions are different and more powerful than wildcard characters
  • made of special symbols which designate type of characters.
  • grep requires a regular expression pattern as a parameter, and prints all the lines in a file containing that pattern.
  • grep is especially useful in combination with pipes as you can filter the results of other commands.
  • For example, perhaps you only want to see only the information in an EMBL file relating to the origin of the

sequence, that is, the DE line?

Exercise

  • While in the hdi2u_files directory, type the command:
grep "DE" hsy14768.embl

What is this command doing?