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.

Required fields*

11
  • Ideally OP would zero-pad the file names, then using a simple glob like ./* should work with any shell... Commented Nov 16, 2018 at 19:31
  • Thanks for the edit, don; I'm still experimenting with zsh. Commented Nov 16, 2018 at 19:32
  • No problem. You could also use a function as shown here Commented Nov 16, 2018 at 19:35
  • Ahhh; I had searched here for zsh filename sorting and landed on one of Gilles' answers and ran with it. Credit to Gilles, blame to me! Commented Nov 16, 2018 at 19:38
  • 1
    Why the complexity in zsh? This zsh -c 'for script in folder/*.script*.sh(n);do printf "Executing script: %s\n" "$script";done' seems to work correctly. Reference Commented Nov 16, 2018 at 19:53