Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reading multiple return values with Bashs read function

7 views
Skip to first unread message

ceving

unread,
Dec 1, 2011, 1:22:37 PM12/1/11
to
A few days ago I discovered an interesting use of process substitution
and the read function. This makes it possible to read more than one
string from a sub shell without loosing the original standard input.
You can find the details here: http://goo.gl/6txBH
The result is a bit cryptic. Does anybody know a simpler solution for
this problem?

Barry Margolin

unread,
Dec 1, 2011, 5:15:15 PM12/1/11
to
In article
<af90c85d-f2ed-4cd2...@w1g2000vba.googlegroups.com>,
read DAY MONTH REST < <(date)

The solution on your web page only works on systems that use /dev/fd,
not a FIFO, for process substitution.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
0 new messages