Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2007 22:50:23 -0500
From:      parv@pair.com
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        f-q <freebsd-questions@freebsd.org>
Subject:   Re: [OT] What does this pipe do?
Message-ID:  <20070125035023.GA4657@holestein.holy.cow>
In-Reply-To: <200701241547.l0OFlUJR098159@lurza.secnetix.de>
References:  <17846.45976.831959.633584@jerusalem.litteratus.org> <200701241547.l0OFlUJR098159@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
in message <200701241547.l0OFlUJR098159@lurza.secnetix.de>,
wrote Oliver Fromme thusly...
>
> Just for completeness, ">&" (file) and ">|" (pipe) are also
                                          ^^
                                          ^^
> supported by zsh (which is a bourne-shell like sh, ksh or bash).

The ">|" construct (in bash [23] & zsh 4), as I know, is to bypass
no-clobber option (when set of course) when redirecting to a file.
Actually, from zshall(1) ...

  >| word
  >! word
    Same as >, except that the file is truncated to zero  length  if
    it exists, even if CLOBBER is unset.
  ...
  >>| word
  >>! word
    Same  as  >>,  except  that  the  file is created if it does not
    exist, even if CLOBBER is unset.


> In fact it's simply a shortcut for "2>&1" (which means to dup
> descriptor 2 [=stderr] to desciptor 1 [=stdout]).


  - Parv

-- 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070125035023.GA4657>