Thank you for the correction. Having only used Unix from Seventh
Edition on, research-editions only, I have never used head(1) and
didn't realize it was written so early.


On Mon, Jul 5, 2021 at 12:38 PM Clem Cole <clemc@ccc.com> wrote:
Noel.  Pls check the TUHS archives and I think you will see sed does yet exist in 6th edition when Joy wrote head in 1977.  Certainly not yet at UCB.  

On Sun, Jul 4, 2021 at 9:34 PM Noel Hunt <noel.hunt@gmail.com> wrote:
> But note that when wnj wrote head(1), Joy followed the
> famous `Unix Philosophy' of  doing one (small) job
> well.   Which means he did not add a feature *i.e.*
> abusing, an old program, like cat(1), and add some new
> switch to it that that told the program stop outputting
> after n lines.  Instead Joy wrote a simple new tool.

He didn't need to abuse any existing program by adding new
flags or the like; unless I am mistaken, `sed Nq', for some
number `N', does exactly what `head -N' would do on a single
file, obviating the very need for head(1).

--
Sent from a handheld expect more typos than usual