zsh-users
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Petre Bandac <petre@kgb.ro>
Cc: zsh-users@sunsite.dk
Subject: Re: bash command incompatibility
Date: Wed, 28 Jul 2004 04:02:13 -0700	[thread overview]
Message-ID: <20040728110213.GA30625@blorf.net> (raw)
In-Reply-To: <20040728110734.157a74e4@xxl.rdsbv.ro>

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..


  parent reply	other threads:[~2004-07-28 11:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28  8:07 Petre Bandac
2004-07-28  9:26 ` Peter Stephenson
2004-07-28 11:02 ` Wayne Davison [this message]
2004-07-28 17:10   ` Dan Nelson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040728110213.GA30625@blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=petre@kgb.ro \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).