9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] The freq command
@ 2007-10-06  6:37 underspecified
  2007-10-07 16:54 ` Rob Pike
  0 siblings, 1 reply; 3+ messages in thread
From: underspecified @ 2007-10-06  6:37 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

Greetings,

I have been using Plan 9 in various forms for a short while, and I am very
impressed with its minimalist design -- particularly its tendency not to
implement any function that can be done by combining other functions.

At first I missed rgrep et al, but I found that alternatives like 'grep $foo
`{du $bar}' worked just as well. So I was surprised to find the program
freq: it prints histograms of the character distributions in files. I am
interested in doing things like identifying the language of a file, and
thought it might be useful in tasks like that, but I wanted to ask what
people in the p9 community use it for.

Is freq used as the basis for other statistical tasks? Is it used by any
components of the OS? My apologies if this has already been discussed. I am
not interested in learning how it works (I have the man page and source),
rather I want to know the why behind its creation.

--underspecified

[-- Attachment #2: Type: text/html, Size: 1054 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] The freq command
  2007-10-06  6:37 [9fans] The freq command underspecified
@ 2007-10-07 16:54 ` Rob Pike
  2007-10-09  5:56   ` underspecified
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Pike @ 2007-10-07 16:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

freq is a ken original, an old program that sat in his personal bin
for a long time.
i don't remember what caused it to become public.

the -r option was a late addition.

it's an odd tool in the old unix tradition.  its output is rarely the
final answer
but somehow encodes what you're looking for: this file is ascii; this file is
latin-1; there are no tabs in this file.

i don't think most people even know about it. it's not a central
application; just
a reminder of the halcyon days of fun little tools.

-rob


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] The freq command
  2007-10-07 16:54 ` Rob Pike
@ 2007-10-09  5:56   ` underspecified
  0 siblings, 0 replies; 3+ messages in thread
From: underspecified @ 2007-10-09  5:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 824 bytes --]

Greetings,

Thank you for the informative reply.

Freq is a nice little program. More people should know about it.

Hoping for a return of the halcyon days of fun little tools,

--underspecified

On 10/8/07, Rob Pike <robpike@gmail.com> wrote:
>
> freq is a ken original, an old program that sat in his personal bin
> for a long time.
> i don't remember what caused it to become public.
>
> the -r option was a late addition.
>
> it's an odd tool in the old unix tradition.  its output is rarely the
> final answer
> but somehow encodes what you're looking for: this file is ascii; this file
> is
> latin-1; there are no tabs in this file.
>
> i don't think most people even know about it. it's not a central
> application; just
> a reminder of the halcyon days of fun little tools.
>
> -rob
>

[-- Attachment #2: Type: text/html, Size: 1145 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-09  5:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-06  6:37 [9fans] The freq command underspecified
2007-10-07 16:54 ` Rob Pike
2007-10-09  5:56   ` underspecified

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).