Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: cat -u Keywords: cruft Message-ID: <9011@smoke.BRL.MIL> Date: 29 Nov 88 14:22:09 GMT References: <175@ernie.NECAM.COM> <189@wyn386.UUCP> <8910@smoke.BRL.MIL> <118@hudson.Morgan.COM> <8941@smoke.BRL.MIL> <480@auspex.UUCP> <8956@smoke.BRL.MIL> <730@quintus.UUCP> <8973@smoke.BRL.MIL> <748@quintus.UUCP> <8985@smoke.BRL.MIL> <4864@bsu-cs.UUCP> <783@stolaf Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Distribution: na Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <783@stolaf.UUCP> mike@wheaties.ai.mit.edu writes: >With raw I/O it works as expected, with fread it doesn't. Yup, that's the whole point. (not really "raw I/O") >If your loop is > while ((c = getchar()) != EOF) > putchar(c); >then it works as expected, at least on the machines I have used. No, that implementation is broken too. >The cat I use (one I wrote myself) doesn't take any switches. >It's also faster. Same for the one I recently posted.