---

Piped Variable Scoping In The Linux Or Unix Shell

[ Thanks to Mike
Golvach
for this link. ]

“Today we’re going to look at variable scoping within a
piped-while-loop in a few Linux and Unix shells. We’re actually
almost at this point in our series of ongoing posts regarding bash,
Perl and awk porting.

“Probably the most interesting thing about zsh (and shells that
share its characteristic, in this sense) is that the scope of
variables passed through a pipe is slightly different than in other
shells, like bash and ksh (Note that not all vendor’s versions are
equal even if they have the same name…!)”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis