Antonio Diaz <[EMAIL PROTECTED]> wrote:
> I agree it is perhaps not worth to have another program for such a
> task, but I think it should be not too dificult to add that
> functionality to the program "cut".

Sorry, but it would not be appropriate to add
such functionality to cut.

...
> I like much more "The software tools philosophy" than the "learn a new
> programming languaje for every task philosophy". And possibly many of
> the GNU users that aren't sysadmins agree with this.
>
> The Perl motto is "There's more than one way to do it". Well, my way
> is not to use it. :) (Of course my way can't be appropiate for
> everybody).

We don't need Perl for this.  Just use grep (or sed or g/awk):

>>    -M, --max-length=<n>     remove lines longer than <n>
>
>   perl -ne 'my $x = $_; chomp; length > 100 or print $x'
>   perl -ne 'my $x = $_; chomp; print $x if length <= 100'

grep -E '^.{0,100}$'

>>    -m, --min-length=<n>     remove lines shorter than <n>
>
>   perl -ne 'my $x = $_; chomp; length < 100 or print $x'
>   perl -ne 'my $x = $_; chomp; print $x if length >= 100'

grep -E '^.{100}'


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to