From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: MULTIOS input
Date: Thu, 28 Jun 2007 22:12:30 -0700 [thread overview]
Message-ID: <070628221230.ZM31544@torch.brasslantern.com> (raw)
In-Reply-To: <pdy988306240813c2a86d2607d1@[192.168.1.2]>
On Jun 27, 12:40pm, Dave Yost wrote:
}
} Is this working correctly? I'm on Mac OS X 10.4.10.
It's not working incorrectly, I guess.
I'm not sure if this is part of your question, but the <<< operator
appends an implicit newline, so the newline you embedded in the
quotes makes two.
/dev/fd/0 refers to the standard input, which is NOT the standard input
of the subshell (the pipe from "echo line 2") -- it's the standard
input of "cat", which (when I try it on linux) is the <<< operator, so
I see "line 1\n\n" twice.
Whether that's what you get on some other OS depends on whether there
really is a /dev/fd/0 or whether zsh is simulating it, and possibly on
whether the I/O buffering is such that you can read the same input from
the /dev/fd device more than once.
} 0 298 Z% cat foo
} #!/usr/local/packages/zsh/bin/zsh
}
} echo ZSH_VERSION is $ZSH_VERSION
}
} setopt MULTIOS
}
} echo line 2 \
} | (
} cat <<< 'line 1
} ' < /dev/fd/0
} )
} 0 299 Z% ./foo
} ZSH_VERSION is 4.3.4
} line 1
}
} 0 300 Z%
}-- End of excerpt from Dave Yost
next prev parent reply other threads:[~2007-06-29 5:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 19:40 Dave Yost
2007-06-29 5:12 ` Bart Schaefer [this message]
2007-06-29 18:34 ` Wayne Davison
2007-06-30 0:20 ` Bart Schaefer
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=070628221230.ZM31544@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@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).