bug-bash
[Top][All Lists]
Advanced

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

Re: mapfile doesn't accept input from a pipe


From: Keith Thompson
Subject: Re: mapfile doesn't accept input from a pipe
Date: Thu, 29 Jun 2017 09:38:19 -0700

On Thu, Jun 29, 2017 at 6:56 AM, Eduardo A. Bustamante López
<address@hidden> wrote:
> On Wed, Jun 28, 2017 at 07:08:27PM -0700, Keith Thompson wrote:
> [...]
>>         mapfile REDIRECT < /tmp/input.txt
>>         cat /tmp/input.txt | mapfile PIPE
>
> The `mapfile PIPE' is a piece of a pipeline, and as such, it runs in a
> subshell (different process).
>
> See: http://mywiki.wooledge.org/BashFAQ/024

OK, that makes sense, and of course the same thing applies to "read".

I suggest that it would be worthwhile to mention this issue in the
documentation.
The fact that it's a FAQ suggests that people are likely to run into it.



reply via email to

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