lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mass file linting


From: David Wright
Subject: Re: Mass file linting
Date: Fri, 18 Dec 2020 14:13:47 -0600
User-agent: Mutt/1.10.1 (2018-07-13)

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

[Prev in Thread] Current Thread [Next in Thread]