<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">the useless use of head, reminds me of my favorite quote from The UNIX Programming Environment ...<div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9.8px/normal Times; color: rgb(61, 63, 55); "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"> With these ideas, it might seem sensible </span></font><span style="color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">to </span></font></span><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">write a program, called </span></font><span style="font: 10.1px Times; color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">head, </span></font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9.8px/normal Times; color: rgb(61, 63, 55); "><span style="font: 10.1px Times; color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"></span></font></span><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"> to print the first few lines </span></font><span style="font: 9.9px Times"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">of </span></font></span><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">each filename argument. But </span></font><span style="font: 10.3px Times"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">sed </span></font></span><span style="font: 9.9px Times; color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">3q </span></font></span><span style="color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">(or </span></font></span><span style="font: 9.5px Times; color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">10q) </span></font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9.8px/normal Times; color: rgb(61, 63, 55); "><span style="font: 9.5px Times; color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"></span></font></span><span style="font: 9.6px Times"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"> is </span></font></span><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">so easy to type </span></font><span style="font: 9.9px Times"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">that </span></font></span><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">we</span></font><span style="color: #5b5c53"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">'</span></font></span><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">ve never felt </span></font><span style="color: #2b2e26"><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">the </span></font></span><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;">need.</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9.8px/normal Times; color: rgb(61, 63, 55); "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"> ~ p.124</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9.8px/normal Times; color: rgb(61, 63, 55); "><font class="Apple-style-span" face="Courier" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><div>On Jan 5, 2012, at 9:50 PM, Eitan Adler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Thu, Jan 5, 2012 at 9:39 PM, Jan Schaumann <<a href="mailto:jschauma@netmeister.org">jschauma@netmeister.org</a>> wrote:<br><blockquote type="cite">Matthew Story <<a href="mailto:matt@tablethotels.com">matt@tablethotels.com</a>> wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Or just not use grep at all.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">indeed ... for the uninitiated: <a href="http://partmaps.org/era/unix/award.html#grep">http://partmaps.org/era/unix/award.html#grep</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On that occasion, I shall pimp my own "Useless Use of *" presentation I<br></blockquote><blockquote type="cite">gave at SCALE back in 07:<br></blockquote><blockquote type="cite"><a href="http://netmeister.org/misc/useless_use.pdf">http://netmeister.org/misc/useless_use.pdf</a><br></blockquote><br>You have a useless use of awk here.<br><br>awk '{print $2}' < file<br>should be<br>cut -d ' ' -f 2 file<br><br>Generally it looks like a good presentation though. Wish I was there.<br><br>-- <br>Eitan Adler<br>_______________________________________________<br>talk mailing list<br><a href="mailto:talk@lists.nycbug.org">talk@lists.nycbug.org</a><br>http://lists.nycbug.org/mailman/listinfo/talk<br><br></div></blockquote></div><br></div></body></html>