Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: redirecting stdout of no/empty command
- X-seq: zsh-users 16707
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Isaac Huang <iclaymore@xxxxxxxxx>
- Subject: Re: redirecting stdout of no/empty command
- Date: Fri, 6 Jan 2012 20:43:51 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=mesmtp; bh= oE1JxDYPqgT/8YwQbqjnsiSGY08=; b=nOAfGJHH1DaTxEN0ZawFdUc0WqMFQVLe mx/z52YdhFbwWAr7YsVjsRxyBl6wAxHl4dhm3erFFoGLk6pbE6Yvra1rTqq/WWXC TCcvKG+D7uJk86UkJ17aJew/5DPf4k0HjwSmqGKSqDOtsClt+2n4Qk9olMKMzzgb ORSHWqIEp3g=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=oE1JxDYPqgT/8YwQbqjnsiSGY08=; b=H6XsxGFCDXnv3/YT2/u3qQF9aIuk qy8DgDintdh87tZ2tDnDS0D4tjd3NOCuNHpwYhBlWbGBscg2+VNUIeNC92fAiWXe NZWUQQ+Zg8WFbBEOm1b2otrUCMU0ss+ZNUj1H3NY0oe5GDBQoPQpIz/PKW5YmfMd cwj5V4SjIBaGQr0=
- In-reply-to: <CAOtRsER5YhM_-oQyOvRdvCGCx17FhfDj-x_G6kiHi_TsSo=ekA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAOtRsER5YhM_-oQyOvRdvCGCx17FhfDj-x_G6kiHi_TsSo=ekA@mail.gmail.com>
Isaac Huang wrote on Fri, Jan 06, 2012 at 11:34:26 -0700:
> Hi list,
>
> I noticed a zsh behaviour today. If I tried to run '>/dev/null' (i.e.
> stdout redirection of no command at all) on an interactive zsh, the
> zsh would actually run a 'cat', and it wouldn't exit until a ^D or ^C.
>
> The same thing on bash seemed to be a no-op.
Actually it truncates the file.
$ echo foo>1
$ >1
$ cat 1
$
> I wonder why zsh would
> run 'cat' when it was given no command to run at all.
>
As a shorthand.
See also NULLCMD and READNULLCMD in zshall(1).
> Please CC me as I'm not on the list. Thanks.
>
> - Isaac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author