From: Dominik Vogt <dominik.vogt@gmx.de>
To: zsh-users@zsh.org
Subject: Re: inconsistency between bash and zsh subshells
Date: Mon, 23 May 2022 18:04:35 +0100 [thread overview]
Message-ID: <You+o1GbiLO2KhYj@gmx.de> (raw)
In-Reply-To: <CAOLfK3XuyVFK16yxjgFCYRbtEYHJ7m5_XmxfsrmAHi7GYdt3Lw@mail.gmail.com>
On Mon, May 23, 2022 at 11:55:09AM -0500, Matt Zagrabelny wrote:
> zsh$ rm -f /tmp/FOO
> zsh$ ls /tmp/FOO 2> /dev/null || echo "no /tmp/FOO"
> no /tmp/FOO
> zsh$ echo | while read LINE; do IP=$(echo $LINE | cut -d ' ' -f 1); if [ -n
> "$IP" ]; then echo FOO; FOO=$(touch /tmp/FOO); else echo BAR; fi; done; ls
> /tmp/FOO 2> /dev/null || echo "no /tmp/FOO"
This output cannot have been generated by the above command:
> BAR
> /tmp/FOO <--- ???
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
prev parent reply other threads:[~2022-05-23 17:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 16:55 Matt Zagrabelny
2022-05-23 17:01 ` Mikael Magnusson
2022-05-23 17:26 ` Matt Zagrabelny
2022-05-23 17:31 ` Mikael Magnusson
2022-05-23 17:51 ` Matt Zagrabelny
2022-05-23 17:04 ` Dominik Vogt [this message]
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=You+o1GbiLO2KhYj@gmx.de \
--to=dominik.vogt@gmx.de \
--cc=zsh-users@zsh.org \
/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).