Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!tcdcs!dce.ie!ch From: ch@dce.ie (Charles Bryant) Newsgroups: comp.unix.programmer Subject: Re: filters Message-ID: <1990Dec4.105612.14422@dce.ie> Date: 4 Dec 90 10:56:12 GMT References: <1990Dec4.103255.14195@dce.ie> <109685@convex.convex.com> <10763:Dec221:21:1590@kramden.acf.nyu.edu> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 23 In article <10763:Dec221:21:1590@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >... cat should use read() and write() for efficiency and >error checking, but that means a rewrite that nobody's bothered doing. Well I can't resist a challenge like that. See <1990Dec4.103255.14195@dce.ie> in alt.sources. Not only does it use read() and write(), and checks for errors on close(), but it also has the nice feature of having no features. Many cat programs have several options, none of which can really be justified: -u (unbuffered). My cat is always unbuffered. dd(1) is for buffering -s (silent). Just use "cat 2>/dev/null". -v (show control characters) That's a job for a seperate program Anyway, my cat.c is available in alt.sources. It is public domain - you can sell it or give it away or ignore it as you like. Btw, I agree that its silly having to check for errors on close(). -- Charles Bryant (ch@dce.ie) -- /usr/ch/.signature: Block device required