Re: ksh - no "read" from pipe, but not common "subshell" issue
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 11/17/05
- Next message: Jim Showalter: "shifting files through directories"
- Previous message: Bill Marcum: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- In reply to: Lars Kellogg-Stedman: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Next in thread: dan.rickhoff_at_comcast.net: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Reply: dan.rickhoff_at_comcast.net: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Reply: dan.rickhoff_at_comcast.net: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 17 Nov 2005 14:44:34 -0500
On 2005-11-17, Lars Kellogg-Stedman wrote:
>> No, it's not, unless OSX does something differently from other
>> unices. Try it and see.
>
> I don't post untested code.
On any other system, this is what happens:
$ echo "Hello World." | { read; echo "$REPLY"; }
Hello World.
And, since the OP is using ksh, the same result should obtain
without the braces:
$ echo "Hello World." | read; echo "$REPLY"
Hello World.
If this is not what happens, there is something wrong with either
the OS or the shell.
To dan.rickhoff: What happens if you use bash instead of ksh?
-- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence
- Next message: Jim Showalter: "shifting files through directories"
- Previous message: Bill Marcum: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- In reply to: Lars Kellogg-Stedman: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Next in thread: dan.rickhoff_at_comcast.net: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Reply: dan.rickhoff_at_comcast.net: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Reply: dan.rickhoff_at_comcast.net: "Re: ksh - no "read" from pipe, but not common "subshell" issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|