[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problems with 'read'ing from a pipe

From: John Smith
Subject: problems with 'read'ing from a pipe
Date: Fri, 14 Mar 2008 16:21:52 +0100


I was running into some unexpected behavior with bash and reading from
a pipeline, and am starting to wonder if im running into a bug or
whether im just doing something wrong.

For example, if I type the following :

echo foo | read VAR
echo $VAR

I would expect the the variable named VAR to contain the value foo.
Instead, the variable foo remains empty. Is this a bug or am I doing
something wrong ?


John Smith

reply via email to

[Prev in Thread] Current Thread [Next in Thread]