Operation of more command

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 27 13:12:53 UTC 2008


On Sunday 27 April 2008 12:25, Michael D. Setzer II wrote:
> I'm the current developer of g4l, and it has used busybox before I took over,
> and has been excellent. I have just noticed one issue involving the more
> command. The g4l project is a bootcd for disk imaging, and doesn't make a
> lot of use of the more command, but there are times when checking things
> would make more a nice option, but both the busybox and even the one
> from Fedora 8 seem to work just like cat.

Please describe how are you using "more". What is the exact command?

> In looking at the code of the 
> more.c, it appear it acts like cat under some situations.

It does it on purpose:

        /* Another popular pager, most, detects when stdout
         * is not a tty and turns into cat. This makes sense. */
        if (!isatty(STDOUT_FILENO))
                return bb_cat(argv);

This is needed to make e.g. "man <cmd> | sed ... >file"
work (man internally starts more, or another $PAGER).

--
vda



More information about the busybox mailing list