Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bash command incompatibility
- X-seq: zsh-users 7778
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Petre Bandac <petre@xxxxxx>
- Subject: Re: bash command incompatibility
- Date: Wed, 28 Jul 2004 04:02:13 -0700
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20040728110734.157a74e4@xxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040728110734.157a74e4@xxxxxxxxxxxx>
On Wed, Jul 28, 2004 at 11:07:34AM +0300, Petre Bandac wrote:
> [petre@xxl]$ cat /dev/null > fetchmail.log
As an alternative to turning off the no_clobber option (as Peter
suggested), you can just tell zsh that you know that the file already
exists by using a '|' after the '>', like this:
cat /dev/null >|fetchmail.log
If you enable the option hist_allow_clobber, then any time you get a
"file exists" error, you can just recall the command from the history
and press Enter because the '|' will have been added for you.
Finally, you can avoid the problem all together by using cp:
cp /dev/null fetchmail.log
That works in any shell and is easier to type.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author