Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    I like the % use; just note that the glob expansion will not catch any subdirectories, like find will. Not that there's a good answer to the question in the title -- thus all these workarounds. Commented Jun 8, 2015 at 1:54
  • You didn't mention any subdirectories in the question and it is unclear how the f2py command handles filenames, whether they can be with full path or not, so I went by the example. In case of subdirectories you will need some kind of postprocessing, either by feeding the data to a wrapper as suggested above or feeding them o another one-liner like mine: find -name *p90 | while read a; do ...some-clever-postprocessing...; f2py ...; done. Did I get it right this time? If so let me know so that I can update the answer. Commented Jun 8, 2015 at 10:47
  • It's not my question; I just wanted to point out that the question uses find, which recurses. Commented Jun 8, 2015 at 10:59
  • Oh, I see, sorry about that, I was on the phone and assumed, prematurely obviously. Commented Jun 8, 2015 at 11:28