zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-users@zsh.org>
Subject: Re: Use glob patterns while reading a file
Date: Fri, 9 Nov 2018 09:35:53 +0000	[thread overview]
Message-ID: <1541756153.3720.1.camel@samsung.com> (raw)
In-Reply-To: <CAJjRh0SROuSoc4f+3bqLNsc+iASx7MRULrNWqdPjK+MKFHys7A@mail.gmail.com>

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


  reply	other threads:[~2018-11-09  9:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181108225555epcas2p274de218aef35e46f189ebbfbd9d1892f@epcas2p2.samsung.com>
2018-11-08 22:53 ` Dominik Ritter
2018-11-09  9:35   ` Peter Stephenson [this message]
2018-11-09 14:37     ` Dominik Ritter
2018-11-09 16:20       ` Peter Stephenson
2018-11-10  1:21     ` Daniel Shahaf
2018-11-10  2:07       ` Bart Schaefer
2018-11-10  2:12         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541756153.3720.1.camel@samsung.com \
    --to=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).