Re: Searching files by number of lines in the file

2018-12-11 Thread Roland Küffner
Nice problem. Rich’s patterns works for me - if I put some parentheses around the whole pattern: (^.*?\n){XXX} I guess, without the pattern the quantifier only checks for the „\n“ and you are in fact searching for a line of text followed by XXX line breaks (aka empty lines). -Roland On Tue, Dec

Re: Searching files by number of lines in the file

2018-12-11 Thread Sam Hathaway
Rich’s pattern doesn’t work for me, but this does: ``` \A([^\r]*\r){N}\z ``` Details: ``` match: \A - the beginning of the file (){N} - followed by exactly N of: [^\r]* - zero or more non-linebreak characters \r

Re: Searching files by number of lines in the file

2018-12-11 Thread Rich Siegel
On 12/10/18 at 7:26 AM, philippe.ca...@gmail.com (Philippe Carly) wrote: More specifically, I have a directory which contains a large number of subdirectories, each containing (among other things) a fileinfo.php file. I now that this fileinfo.php should have N lines. And I am trying to

Re: Searching files by number of lines in the file

2018-12-11 Thread Patrick Woolsey
On 12/10/18 at 9:22 AM, bbedit@googlegroups.com ('Holger Bartel' via BBEdit Talk) wrote: Absolutely untested, but maybe something like counting number of line ends followed by a line break/return as in search for: $\r{number_of_lines} or $\n{number_of_lines} could work? Grep needs to be

Re: Searching files by number of lines in the file

2018-12-11 Thread Sam Hathaway
Folks, Philippe pointed out that my mail client may havr munged the quotes in that command line. It should be: find /path/to/files -name fileinfo.php -exec sh -c 'test `cat {} | wc -l` -ne N' \; -print I should have run it through BBEdit's useful "Straighten Quotes" command before

Re: Searching files by number of lines in the file

2018-12-11 Thread Philippe Carly
Hello Holger, thank you for your feedback... Unfortunately BBEdit doesn't seem to understand the {x,y} bit of the GREP search cheers Philippe On Monday, December 10, 2018 at 3:50:21 PM UTC+1, Hoger November wrote: > > Hi, > > Absolutely untested, but maybe something like counting number of

run javascript from BBEdit

2018-12-11 Thread Gauvins
Running Python scripts from BBEdit is extremely convenient. What would be the best way to test code snippets (or an entire script) written in javascript (on OSx)? -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email