Re: effing Nader
- From: "Keith F. Lynch" <kfl@xxxxxxxxxxxxxx>
- Date: 24 Jan 2006 22:26:37 -0500
<rkshullat@xxxxxxxxxxxxxxxxx> wrote:
> Joe Ellis <synthfilker@xxxxxxxxxxxxx> wrote:
>> No, you're just hiding behind a deliberately unreadable command.
Of course it's unreadable to anyone who doesn't know the language.
You have to *learn* languages. At least GUI fans no longer make the
silly claim that their interface is "intuitive," at least not in the
sense that it offers the power of a language without the bother of
having to learn a language. As I've said, I don't think it offers the
power of a language no matter how much effort you put into learing it.
>> Tell me what it means in plain English, and I'll bet it's simple in
>> Mac OS X. Probably takes fewer keystrokes, too. And it'll be a
>> DAMN sight easier to understand.
> I think it was:
> "cat a??b | sort | uniq -c | fgrep -v -i -f foo | sort -r | more"
> It concatenates the contents of all files in the current directory
> whose names are exactly 4 characters in length, start with 'a' and
> end with 'b'. It then sorts the result lexically according to the
> default sorting rules for the system or environment, removes
> sequentially duplicated lines and outputs each line prepended by the
> number of times that line appeared in sequence. The resulting output
> is then filtered to show all lines which do not match any of the
> non-case sensitive set of strings contained in the file "foo", and
> finally sorted in reverse order and output one "page" at a time.
Right.
> I'm not sure exactly what, if anything, Keith uses that command line
> for, but I use similar constructions on a daily basis.
It's loosely based on something I've done for WSFA meetings. Say each
file that begin with "a" and end with "b" is a list of everyone who
was at a particular meeting, with one name per line. And that there's
one such file for every meeting, ever. And that the file "foo" is a
list of paid members. Then that command generates a list of everyone
who has attended meetings but is not a paid member, in descending
order of attendance, along with the total number of meetings they've
attended.
I look forward to hearing how Joe Ellis would do the same, with less
time and effort than it took me to type this sentence.
> And given the "uniq -c" in the middle the final sort should probably
> have "-n" as an option to sort the line counts numerically.
Not necessary unless the numbers are six or more digits. I won't have
to worry about it for another 4000 years or so.
Like you, I use such commands every day. It's not really that much
learning. Mostly just the commands cat, cut, diff, fg, [f]grep, ls,
sed, sort, tee, and uniq, together with their more useful switches,
the connectors |, <, >, and >>, and how regular expressions work.
Throw in awk, and you may never need to resort to perl or java,
much less C.
Then there's emacs, which has a different set of strengths. I
actually spend most of my online time in emacs.
--
Keith F. Lynch - http://keithlynch.net/
Please see http://keithlynch.net/email.html before emailing me.
.
- Follow-Ups:
- Re: effing Nader
- From: Joe Ellis
- Re: effing Nader
- References:
- Identity defacing. Another problem with blogoverse discussion.
- From: Mark Atwood
- Re: effing Nader
- From: Keith F. Lynch
- Re: effing Nader
- From: Joe Ellis
- Re: effing Nader
- From: rkshullat
- Identity defacing. Another problem with blogoverse discussion.
- Prev by Date: AKICIF: looking for UK pound offshore current account
- Next by Date: Re: effing Nader
- Previous by thread: Re: effing Nader
- Next by thread: Re: effing Nader
- Index(es):
Relevant Pages
|
Loading