bug-bash
[Top][All Lists]
Advanced

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

Re: bash uses tmp files for inter-process communication instead of pipes


From: Chet Ramey
Subject: Re: bash uses tmp files for inter-process communication instead of pipes?
Date: Tue, 07 Oct 2014 10:26:29 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 10/6/14, 3:38 PM, Linda Walsh wrote:
> Greg Wooledge wrote:
>> On Mon, Oct 06, 2014 at 12:14:57PM -0700, Linda Walsh wrote:
>>>    done <<<"$(get_net_IFnames_hwaddrs)"
>>
>>> Where am I using a HERE doc?
>>
>> <<< and << both create temporary files.
> 
> 
> According to Chet , only way to do a multi-var assignment in bash is
> 
> read a b c d  <<<$(echo address@hidden)
> 
> Forcing a simple assignment into using a tmp file seems Machiavellian --
> as it does exactly the thing the user is trying to avoid through
> unexpected means.

Don't mix a capability -- shorthand to provide arbitrary data on stdin
to the shell or a different process -- with your use of it.  You've
chosen to use this mechanism for assignment rather than something less
baroque, but that doesn't mean the capability is any less general.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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