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
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
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
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
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
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
I don’t know how to do it with BBEdit, but this shell command will
work:
`find /path/to/files -name fileinfo.php -exec sh -c 'test `cat {} | wc
-l` -ne N’ \; -print`
Replace `/path/to/files` with the path to your directory and `N` with
your “N”.
Hope this helps.
-sam
On 10 Dec 2018, at
Hi,
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 turned on for that, in case
that’s new.
I think $\n{min, max} should find those that
I would like to find multiple files (I know how to do that)
that don' have a specific number of lines (this I don't know).
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