Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: preventing the leading space in process substitution
- X-seq: zsh-users 13207
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: zsh users mailing list <zsh-users@xxxxxxxxxx>
- Subject: Re: preventing the leading space in process substitution
- Date: Wed, 10 Sep 2008 12:13:22 +0100
- In-reply-to: <20080910094510.GA4225@xxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh users mailing list <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080909144101.GA30693@xxxxxxxxxxxxxxxxxxxx> <20080910094510.GA4225@xxxxxxxxxxxxxxxxxxxx>
On Wed, Sep 10, 2008 at 11:45:11AM +0200, Angel Olivera wrote:
> On Tue 09.Sep.08 15:41, martin f krafft wrote:
>> I am trying to use <(...) to pass a file to a command that expects the
>> file argument following an equal sign, like so:
>>
>> mycommand -file=/path/to/some/file
>>
>> The problem is that
>>
>> mycommand -file=<(...)
>>
>> seems to yield
>>
>> mycommand -file= /proc/self/fd/16
>>
>> with the space before the filename. How do I prevent that?
>
> Also, how would one use =() in this case?
>
> One alternative is:
>
> mycommand -file=$(print =(...))
>
> but there must be a nicer way.
[...]
a==(...) eval 'mycommand "-file=$a"'
Seems to work with a=<(...) as well.
You could also do:
mycommand -file=/dev/fd/3 3<> =(...)
If your system supports /dev/fd/<n>
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author