Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Use glob patterns while reading a file



On Thu, 2018-11-08 at 23:53 +0100, Dominik Ritter wrote:
> I want to use read one of two files, regardless if it exists or not. My
> first approach is to use the alternative glob syntax, but with no luck:
> $(< ./(a|b)(N))

That's a special syntax, expecting a single file so that it doesn't try
to do globbing.

You can get it to work with

$(cat <./(a|b)(N))

pws



Messages sorted by: Reverse Date, Date, Thread, Author