[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Most used words in current buffer
From: |
Nick Dokos |
Subject: |
Re: Most used words in current buffer |
Date: |
Thu, 19 Jul 2018 13:19:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Bob Proulx <bob@proulx.com> writes:
>
> I am in total agreement over using sed instead of head if you want to
> do that. Seeing 'sed 20q' should roll off the keyboard as print lines
> until line 20 and then quit. Very simple and to the point. There is
> definitely no need for a separate head command. Other than for
> symmetry with tail which is not as simple in sed.
>
IIRC, Kernighan & Pike say in the "Unix Programming Environment" that
there *was* a `head' program, in addition to the `tail' program. It
fell into disuse and disappeared almost immediately after sed became
available. tail is still around, I guess both because the sed
invocation for `tail -n' does not quite roll off the fingers the same
way that 20q does -- see e.g
https://unix.stackexchange.com/questions/107387/emulate-tail-with-sed#107388
-- but also because `tail -f' cannot be emulated by sed, at least not
without a lot of effort and/or another program).
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
- Re: Most used words in current buffer, (continued)
- Re: Most used words in current buffer, Emanuel Berg, 2018/07/17
- Re: Most used words in current buffer, Ben Bacarisse, 2018/07/18
- Re: Most used words in current buffer, Bob Proulx, 2018/07/18
- Message not available
- Re: Most used words in current buffer, Udyant Wig, 2018/07/19
- Re: Most used words in current buffer, Bob Proulx, 2018/07/19
- Re: Most used words in current buffer, tomas, 2018/07/19
- Re: Most used words in current buffer,
Nick Dokos <=
- Re: Most used words in current buffer, Eli Zaretskii, 2018/07/19
- Re: Most used words in current buffer, Bob Proulx, 2018/07/19
- Re: Most used words in current buffer, Nick Dokos, 2018/07/20
- Message not available
- Re: Most used words in current buffer, Udyant Wig, 2018/07/20
- Re: Most used words in current buffer, Bob Newell, 2018/07/20
- Re: Most used words in current buffer, Nick Dokos, 2018/07/20
- Re: Most used words in current buffer, Nick Dokos, 2018/07/20
- Message not available
- Re: Most used words in current buffer, Udyant Wig, 2018/07/20
- Re: Most used words in current buffer, Bob Proulx, 2018/07/20
- Re: Most used words in current buffer, Nick Dokos, 2018/07/20