2

I have the following code which prints recursively all files inside /usr/local/include:

% files=(/usr/local/include/**/*(^/))
% print -l $files

Is it possible to get rid of the temporary variable? I would like to simply retrive a list of all files matched with the pattern.

I tried:

% print -l "(/usr/local/include/**/*(^/))"

with no success.

2
  • 1
    Try removing the "( and )" Commented Nov 6, 2013 at 21:35
  • Yes, it works. Really I didn't expect that it should be so simply. Thank you. Commented Nov 6, 2013 at 21:39

1 Answer 1

3
print -rl /usr/local/include/**/*(^/)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.