[wellylug] cat README | more ???
Gordon Paynter
lists at paynter.info
Wed Nov 3 12:49:29 NZDT 2004
On Wed, 03 Nov 2004 11:02, Nick Jensen wrote:
> Why would you pipe the output of `cat README` through more, instead
> of just running `more README`?
I do that all the time. I thin it is out of habit. I often use "cat" when
I'm constructing complex shell commands that pipe through multiple programs,
and I carry the practice over to trivial cases (with a lot of data, I build
commands incrementally, and I use the "cat" method because I can test it
quickly by replacing "cat" with "head"). That's not a good reason, but it is
the reason.
> And why use more at all, when you can use less?
> I'm just curious about this, personally I would have run `less README`.
The blatantly obvious difference between "more" and "less" is that (by
default) "more" leaves the text in your terminal, while "less" takes over the
terminal then cleans up the text when you're finished. So if I want the text
I've viewed to remain on the screen (for example, so I can copy and paste
from it) I use more; and if I want it to go away (for example, so I can see
the commands I previously typed) I use less, or emacs.
I might ask: And why use less at all, when you can use emacs?
Gordon
More information about the wellylug
mailing list