> Line at a time is via enter instead of the space bar. Backwards a page
> at a time is via 'b' just like in less.
>
> Less allows you to use your arrow keys which is nice, but more doesn't.
>
> Also zless will go backwards in a file where zmore can't.
>
> All just points where less can be more useful.
This is the main difference between more and less - less buffers piped
input and more doesn't. So if you're piping something in, you can
only go forward with more (by searching, hitting space for full
screen, or hitting return for single line), but you can go either
direction with less.
That's relevant because there's no magic to zless and friends:
% cat `which zless`
#!/bin/sh
[usage crap skipped]
if test "${LESSMETACHARS+set}" != set; then
# Work around a bug in less 394 and earlier;
# it mishandles the metacharacters '$%=~'.
space=' '
tab=' '
newline='
'
LESSMETACHARS="$space$tab$newline'"';*?"()<>[|&^`#\$%=~'
export LESSMETACHARS
fi
LESSOPEN="|gzip -cdfq -- %s"; export LESSOPEN
exec less "$@"
It's simply telling less to pipe its input from "gzip -d".
zmore is a little more convoluted since more doesn't have an env var
like "LESSOPEN", so the piping is accomplished within the shell
script.
Michael
--
Michael Darrin Chaney, Sr.
[email protected]
http://www.michaelchaney.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nlug-talk?hl=en
-~----------~----~----~----~------~----~------~--~---