zsh-users
 help / color / mirror / code / Atom feed
From: Wawrzek Niewodniczanski <main@wawrzek.name>
To: zsh-users@zsh.org
Subject: mapfile, many files and globbin
Date: Mon, 3 Jun 2013 15:00:04 +0100	[thread overview]
Message-ID: <CAC7-vpCQajB9OFer41GAtrf3-uTxx856fasr7MWu2w+akJjUZg@mail.gmail.com> (raw)

Hi,

Is it possible to mix mapfile module and globbing (for file names)?

In example I have following tree structure and try to put the content
of not empty list file (ideally one per file) to an array.


TEST/1/4/A.list
aaa
bbb
ccc

TEST/2/2/B.list
ddd
eee
fff

TEST/2/3/C.list - empty


I tried various of version around following command:

names=("${(f)mapfile[TEST/**/*list(.L+0)]}")

I will be glad for any suggestions.

Thanks,
Wawrzek


PS.
Eventually, gave up using:
names=($(cat TEST/**/*.list(.L+0)))


--
Dr  Wawrzyniec Niewodniczański    or Wawrzek for short
  PhD in Quantum Chemistry  & MSc in Molecular Engineering
   WWW: http://wawrzek.name E-MAIL: jobs@wawrzek.name
      Linux User #177124


             reply	other threads:[~2013-06-03 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 14:00 Wawrzek Niewodniczanski [this message]
2013-06-03 15:44 ` Bart Schaefer
2013-06-05 21:30   ` Wawrzek Niewodniczanski
2013-06-06  6:17     ` 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=CAC7-vpCQajB9OFer41GAtrf3-uTxx856fasr7MWu2w+akJjUZg@mail.gmail.com \
    --to=main@wawrzek.name \
    --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).