On Fri 18 Dec 2020 at 11:32:38 (-0600), Guy Stalnaker wrote:
> You may know this, but on the chance you do not ...
> 
> Depending on your terminal shell (e.g. I use zsh), you can use the find
> command and its -exec option to find all .ly files in a folder hierarchy
> and run the command on them.
> 
> #> find ./* -type f -iname \*.ly\* -exec [python.ly command here] {} \;
> 
> ./* causes folder recursion

It's unlikely to affect you when processing LP source files,
but could bite you in the general case: find is intrinsically
recursive (curtailed by -maxdepth and -prune).

Writing ./* instead of . (or a directory name) has two effects:

- the top-level directories will be visited in order
  (depending on locale), rather than pseudo-randomly,

- top-level dotfiles and dot-directories won't be
  visited at all.

BTW I'm not sure what prompts with #> , but best not do this as root.

Cheers,
David.

Reply via email to