From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id VAA19507 for ; Tue, 4 Jun 1996 21:32:13 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id HAA02447; Tue, 4 Jun 1996 07:22:58 -0400 (EDT) Resent-Date: Tue, 4 Jun 1996 07:22:44 -0400 (EDT) Date: Tue, 4 Jun 1996 13:21:48 +0200 From: Bruce Stephens Message-ID: <199606041121.NAA22037@cantecler.math.ruu.nl> To: zsh-users@math.gatech.edu Subject: Re: A peep into the future. Resent-Message-ID: <"5BFxL.0.nb.3o1jn"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/231 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Vincent Lefevre writes: > > if you say "foo > Important_file", zsh checks to see if there > > is anything on the stdout of foo, if not (say foo is > > non-existent), zsh leaves the Imp_file as it is. > > Not a good idea. Sometimes I use this to clear a (temporary) file. > You can set NO_CLOBBER. But sometimes it is not sufficient, e.g. > one use >| then one types a wrong file name. So I'd prefer to have > an automatical backup, e.g. "Important_file" is renamed to > "Important_file.bak". What, just add ".bak"? It's a good idea, in principle, and I'm surprised it's not been done. But if it's to be done, then it ought to follow the same conventions as some (but not all, alas) of the GNU utilities, I think, in particular the file utilities. Two or three environment variables define the behaviour, which allows you to use either simple backups or numbered backups, and if you use numbered backups you can select how many to keep. -- Bruce Stephens | email: B.Stephens@math.ruu.nl Utrecht University | telephone: +31 30 2534630 Department of Mathematics | telefax: +31 30 2518394 P.O. Box 80010, 3508 TA Utrecht | The Netherlands |