[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Bash syntax for using here-doc's or variables as files i
From: |
João Eiras |
Subject: |
Re: [Help-bash] Bash syntax for using here-doc's or variables as files in process substitution |
Date: |
Wed, 27 Jun 2018 23:52:31 +0200 |
On 27 June 2018 at 22:27, Jesse Hathaway <address@hidden> wrote:
> On Wed, Jun 27, 2018 at 3:00 PM, João Eiras <address@hidden> wrote:
>> You will always need to pass some sort of file descriptor to your
>> sub-process, so you can do that implicitly with some process
>> substitution or explicitly with exec while avoiding an extra process.
>
> right, I thought it might be nice to have syntax which allows an
> implicit passing, perhaps something like:
>
> cat <(<<<"bubbles")
> cat <(<<'EOF'
> bubbles
> EOF
> )
>
I just tried and the syntax can be collapsed a bit, but again use of
/dev/fd is not that portable.
cat /dev/fd/$fd 0<&- {fd}<<<"asd"