Util-Linux package development
 help / color / mirror / Atom feed
From: Evan Hunt <ethanol@armory.com>
To: Albert Cahalan <acahalan@gmail.com>
Cc: Karel Zak <kzak@redhat.com>,
	Bryan Henderson <bryanh@giraffe-data.com>,
	ams@gnu.org, P@draigbrady.com, util-linux-ng@vger.kernel.org
Subject: Re: splitting util-linux (was: kill)
Date: Thu, 21 Dec 2006 23:45:53 -0800	[thread overview]
Message-ID: <20061222074553.GA18589@armory.com> (raw)
In-Reply-To: <787b0d920612212212s1ca3179jf037fc71f3f28498@mail.gmail.com>


> As far as I can see, "look" is basically a lame grep.
> Is this something we really need?

Yes, it is.  If you're looking up matching lines in a very large file,
repeatedly, a binary search can be much, much faster than a linear regular-
expression search.  I've written quite a lot of scripts that used look to
good effect.  Here, check out this factor-300 speedup:

    $ time look borealis
    Borealis
    borealis

    real    0m0.003s
    user    0m0.000s
    sys     0m0.004s

    $ time grep -y borealis /usr/share/dict/words
    Borealis
    borealis

    real    0m0.990s
    user    0m0.944s
    sys     0m0.024s

However, you're right about it being lame.  It only searches at the
beginning of the line, making it useless for files that are sorted on
different fields, can only deal with lexical ordering, etc.

I'm fixing this, which is part of why I ended up in this conversation
in the first place; I want to put the improved version into miscutils.

> more -- still better-known than "less", sadly

Ah, a pet peeve of mine. :)

Why doesn't the 'less' package just install 'more' as a link to 'less'?
SCO did that years ago, and nobody ever missed the old version.  And I got
used to "more" being a decent pager, and now every time I try to use it on
linux, I get this annoying broken version...

Evan Hunt


  parent reply	other threads:[~2006-12-22  7:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <787b0d920612192242x3788f4bfh3be846d4188e3767@mail.gmail.com>
2006-12-20  8:57 ` kill (was: Re: util-linux: orphan) Karel Zak
2006-12-20 10:03   ` kill Pádraig Brady
2006-12-20 10:45     ` kill Karel Zak
2006-12-20 21:45       ` kill Alfred M. Szmidt
2006-12-20 23:55         ` kill Karel Zak
2006-12-21  4:10           ` kill Evan Hunt
2006-12-21 16:34             ` splitting util-linux (was: kill) Bryan Henderson
2006-12-21 21:53               ` Karel Zak
2006-12-22  6:12                 ` Albert Cahalan
2006-12-22  7:13                   ` Bryan Henderson
2006-12-22  9:06                     ` Albert Cahalan
2006-12-22  7:23                   ` Bryan Henderson
2006-12-22  7:45                   ` Evan Hunt [this message]
2006-12-22  8:07                     ` Karel Zak
2006-12-22  8:45                       ` Evan Hunt
2006-12-22 11:03                         ` Karel Zak
2006-12-22 16:52                           ` Evan Hunt
2006-12-22 12:32                       ` Ian Kent
2006-12-22 10:24                   ` Karel Zak
2006-12-22 14:50                     ` Mark Rosenstand
2006-12-22 17:38                     ` Albert Cahalan
2006-12-25 20:03                     ` Albert Cahalan
2006-12-25 22:50                       ` Bryan Henderson
2006-12-22  6:44                 ` Bryan Henderson
2006-12-22  7:52                   ` Karel Zak
2006-12-21 10:51           ` kill Alfred M. Szmidt
2006-12-21 11:39             ` kill Martin Mares
2006-12-21 15:30               ` kill Karel Zak
2006-12-21 16:50               ` kill Alfred M. Szmidt
2006-12-21 17:38                 ` kill Albert Cahalan
2006-12-22  1:37                 ` kill Ian Kent
2006-12-20 15:00     ` kill Ian Kent
2006-12-20 16:58     ` kill Albert Cahalan
2006-12-20 16:33   ` kill (was: Re: util-linux: orphan) Albert Cahalan
2006-12-20 21:12     ` Karel Zak
2006-12-21  2:32       ` Albert Cahalan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061222074553.GA18589@armory.com \
    --to=ethanol@armory.com \
    --cc=P@draigbrady.com \
    --cc=acahalan@gmail.com \
    --cc=ams@gnu.org \
    --cc=bryanh@giraffe-data.com \
    --cc=kzak@redhat.com \
    --cc=util-linux-ng@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox