Content:Grep, Sed, and Awk

From Earlham CS Department
Revision as of 16:24, 8 April 2009 by Kay (talk | contribs) (New page: More content about the commands will be coming soon. For now, here's the three "simple" commands Sam and Kay ran: <pre> grep -d recurse "header.html" . | grep -v barndoor | awk '{print $...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

More content about the commands will be coming soon. For now, here's the three "simple" commands Sam and Kay ran:

grep -d recurse "header.html" . | grep -v barndoor | awk '{print $1}' | cut -d: -f1
for x in `cat ~/tmp/filesincludingheader`; do cat $x | sed "s;\.*/*header\.html;/includes/header.html;g" >> $x.newApr8; done
for x in `cat ~/tmp/filesincludingheader`; do mv $x.newApr8 $x; done