Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.unix.questions Subject: Re: Re: sorting and reversing lines of a file Message-ID: <9770@smoke.BRL.MIL> Date: 2 Mar 89 15:16:15 GMT References: <1774@dlvax2.datlog.co.uk> <14660007@hpsal2.HP.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 7 In article <14660007@hpsal2.HP.COM> morrell@hpsal2.HP.COM (Michael Morrell) writes: >... Since the shell is truncating file2 before cat is >invoked, you need a smarter shell, not a smarter cat, to avoid this problem. "Smartness" has nothing to do with it; "> file2" is DEFINED to truncate (i.e. overwrite) an existing file. The shell is doing exactly what it's told. The problem lies in the user's brain somewhere...