Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
mapfile, many files and globbin
- X-seq: zsh-users 17820
- From: Wawrzek Niewodniczanski <main@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: mapfile, many files and globbin
- Date: Mon, 3 Jun 2013 15:00:04 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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@xxxxxxxxxxxx
Linux User #177124
Messages sorted by:
Reverse Date,
Date,
Thread,
Author