From owner-freebsd-questions Thu Feb 27 7:48:44 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A003937B401 for ; Thu, 27 Feb 2003 07:48:43 -0800 (PST) Received: from post-21.mail.nl.demon.net (post-21.mail.nl.demon.net [194.159.73.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74D4543F75 for ; Thu, 27 Feb 2003 07:48:42 -0800 (PST) (envelope-from cls@raggedclown.net) Received: from [212.238.197.102] (helo=mailhost.raggedclown.net) by post-21.mail.nl.demon.net with esmtp (Exim 3.36 #1) id 18oQH3-000KUw-00 for freebsd-questions@freebsd.org; Thu, 27 Feb 2003 15:48:41 +0000 Received: from localhost (localhost [127.0.0.1]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id 42C67C677 for ; Thu, 27 Feb 2003 16:48:40 +0100 (CET) Received: from willow.raggedclown.net (willow.raggedclown.intra [192.168.1.10]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id 8C9001A1A for ; Thu, 27 Feb 2003 16:48:29 +0100 (CET) Received: by willow.raggedclown.net (Ragged Clown Host [willow], from userid 1009) id 66110225F2; Thu, 27 Feb 2003 16:48:30 +0100 (CET) Date: Thu, 27 Feb 2003 16:48:30 +0100 From: Cliff Sarginson To: freebsd-questions@freebsd.org Subject: Re: cat Message-ID: <20030227154830.GA2770@raggedclown.net> References: <20030227053526.GB439@dhumketu.homeunix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030227053526.GB439@dhumketu.homeunix.net> User-Agent: Mutt/1.5.3i X-Virus-Scanned: by AMaViS 0.3.12pre8 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The ultimate answer is that the shell interpets the ">" first, truncating the output file to 0. Quickest way to make a file null bytes long (in sh type shells, not in (t(csh) type): $ >filename In bash (also in ksh I think) you can tell the shell not to clobber an existing file, I think the command is: $ set noclobber Or similar.. -- Regards Cliff [ This mail has been checked as virus-free ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message