The ''file with rules'' is a simple text file, with one '''sed''' substitution rule per line.  Invoking ''sed -f <file with rules>'' on a stream of text data is equivalent to performing '''sed''', sequentially, once for every rule in ''file with rules''.  It’s mainly a time saver, but a significant one.
 
The ''file with rules'' is a simple text file, with one '''sed''' substitution rule per line.  Invoking ''sed -f <file with rules>'' on a stream of text data is equivalent to performing '''sed''', sequentially, once for every rule in ''file with rules''.  It’s mainly a time saver, but a significant one.
   −
Creating this file is another story, and is beyond the scope of this page.  The one case in your assignments where ''sed -f <file with rules>'' will be useful is precisely when transcribing the genetic code.  For this reason, a '''sed''' rules file, listing these substitutions for lowercase bases converting into uppercase amino acids, has been pre-created for you.  You’ve seen this file before: it’s ''~xmlpipedb/data/genetic-code.sed''.
+
Creating this file is another story, and is beyond the scope of this page.  The one case in your assignments where ''sed -f <file with rules>'' will be useful is precisely when transcribing the genetic code.  For this reason, a '''sed''' rules file, listing these substitutions for lowercase bases converting into uppercase amino acids, has been pre-created for you.  You’ve seen this file before: it’s ''~dondi/xmlpipedb/data/genetic-code.sed''.
   −
At this point, your working directory should be ''~xmlpipedb/data''.  Thus, just typing this should allow you to look those rules over, and verify that they indeed represent the genetic code:
+
At this point, your working directory should be ''~dondi/xmlpipedb/data''.  Thus, just typing this should allow you to look those rules over, and verify that they indeed represent the genetic code:
 
  more genetic-code.sed
 
  more genetic-code.sed
Unexpected non-MediaWiki exception encountered, of type "Error"
Error: Call to undefined function each() in /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php:374
Stack trace:
#0 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(480): _DiffEngine->_diag()
#1 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(291): _DiffEngine->_compareseq()
#2 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(175): _DiffEngine->diff_local()
#3 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(653): _DiffEngine->diff()
#4 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(820): Diff->__construct()
#5 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(1240): MappedDiff->__construct()
#6 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(1458): WordLevelDiff->__construct()
#7 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(952): TableDiffFormatter->_changed()
#8 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(895): DiffFormatter->_block()
#9 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(765): DiffFormatter->format()
#10 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(655): DifferenceEngine->generateDiffBody()
#11 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(593): DifferenceEngine->getDiffBody()
#12 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(566): DifferenceEngine->getDiff()
#13 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(409): DifferenceEngine->showDiff()
#14 /apps/xmlpipedb/biodb/fall2013/includes/Article.php(725): DifferenceEngine->showDiffPage()
#15 /apps/xmlpipedb/biodb/fall2013/includes/Article.php(478): Article->showDiffPage()
#16 /apps/xmlpipedb/biodb/fall2013/includes/actions/ViewAction.php(37): Article->view()
#17 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(427): ViewAction->show()
#18 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(304): MediaWiki->performAction()
#19 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(536): MediaWiki->performRequest()
#20 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(446): MediaWiki->main()
#21 /apps/xmlpipedb/biodb/fall2013/index.php(59): MediaWiki->run()
#22 {main}