Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: input redirect from a variable
- X-seq: zsh-workers 21757
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: input redirect from a variable
- Date: Fri, 23 Sep 2005 14:43:15 +0000
- Cc: Dave Yost <Dave@xxxxxxxx>
- In-reply-to: <237967ef0509230315ae86ee9@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <EXCHANGE03czi9yzu2300000458@xxxxxxxxxxxxxxxxxx> <237967ef0509230315ae86ee9@xxxxxxxxxxxxxx>
On Sep 23, 12:15pm, Mikael Magnusson wrote:
}
} > foo1="$(...)"
} > foo2="$(...)"
} >
} > comm -3 <<<<$foo1 <<<<$foo2
}
} comm -3 <(echo "$foo1") <(echo "$foo2")
} but that seems stupid :)
Incidentally:
comm -3 =(<<<$foo1) =(<<<$foo2)
There already is a <<< syntax, but it turns a string into standard input
as a "here document". Wrapping that in =(...) causes zsh to read that
input and put it in the temp file.
A nice optimization (which has not yet been done) would be to have this
special case avoid forking a new process, much as $(<file) reads a file.
Right now =(<<<...) is equivalent to =($NULLCMD <<<...). Which actually
seems like a bug to me; shouldn't it use $READNULLCMD instead? (Not that
one really wants "more" rather than "cat" inside a substitution, but even
outside of substitutions, here-documents are fed to $NULLCMD rather than
to $READNULLCMD.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author