From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16855 invoked by alias); 6 Jan 2012 19:07:52 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16708 Received: (qmail 7081 invoked from network); 6 Jan 2012 19:07:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.212.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IurMLPwM5upIENk1ftiAdVF9E2iBKgYIveVLAB75KYY=; b=JmOpVBwFgQrUJdW8445QA+6fH3EvMjC5/gvFhc08MXQ9mWUZfgs/8qYpGIJjGfxMbK I5LZEQYQNtbAUi8QUnODokEvBmNyR7goUfQUu6FHDow0Cd5BOH3NtXYhIF5FdgBG5x5p 8JODqJvNc6kuH5O/hgBFWu2jC+P++n7ePaiv4= MIME-Version: 1.0 In-Reply-To: <20120106184351.GA26599@daniel3.local> References: <20120106184351.GA26599@daniel3.local> Date: Fri, 6 Jan 2012 20:07:35 +0100 Message-ID: Subject: Re: redirecting stdout of no/empty command From: =?UTF-8?Q?Damien_Th=C3=A9bault?= To: Daniel Shahaf Cc: Isaac Huang , zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 On Fri, Jan 6, 2012 at 19:43, Daniel Shahaf wrote: > 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 have the same behaviour than Isaac: luke% zsh -f luke% >file1 [Typing Hello, World^D^D] luke% cat file1 Hello, World luke% (It's not affecting me much since when I need to have empty input, I use cat /dev/null or echo -n "") -- Damien Thebault