Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site reed.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!reed!alexis From: alexis@reed.UUCP (Alexis Dimitriadis) Newsgroups: net.unix,net.bugs Subject: Re: Creating a file in csh Message-ID: <1422@reed.UUCP> Date: Mon, 29-Apr-85 23:40:47 EDT Article-I.D.: reed.1422 Posted: Mon Apr 29 23:40:47 1985 Date-Received: Wed, 1-May-85 03:36:57 EDT References: <797@u1100a.UUCP> <254@tellab3.UUCP> <1581@ukma.UUCP> <778@sdcsvax.UUCP> <124@ukma.UUCP> Reply-To: alexis@reed.UUCP (Alexis Dimitriadis) Organization: Reed College, Portland, Oregon Lines: 49 Xref: watmath net.unix:4387 net.bugs:639 Summary: >> What's wrong with "touch filename" ? > >As the originator of this mess ... > >The problem with "touch filename" is that the file isn't gauranteed >to be empty. > >The solution I like best came from Peter Honeyman, > > alias \> tee \!* \ >(I think that's how it went. It was that general idea anyway) > > >Now, don't y'all think this has gone on far enough? For an April fool's joke, it has certainly had enough discussion. But given the bizarre ways some folks routinely employ to create an empty file, (see above :-), I think the discussion was not without merit. To summarise: The most convenient way to create empty files in both shells is by using the shell's own output redirection facilities-- there is no need to involve other programs. For the Bourne shell, that is done simply with > file With cshell, you can use :> file (I believe the : is part of an empty label), or use echo > file (The cshell executes echo directly, the Bourne shel doesn't. And, you need not use "echo -n", the cshell echo does not append a newline when there are no arguments). Forgive me if I am redundant, forgive me if I am redundant, Alexis Dimitriadis. -- _______________________________________________ As soon as I get a regular job, the opinions expressed above will attach themselves to my employer, who will never be rid of them again. alexis @ reed ...ihnp4!{harvard|tektronix}!reed ...decvax!tektronix!reed ...teneron!reed