On Sunday 27 April 2008 15:21, Michael D. Setzer II wrote: > > > 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). > > > > cat scriptfile | more > dmesg | more > > Using the same thing within a Fedora machine works fine with the more > lines.
Works for me. Look at the above code. It says "isatty(STDOUT_FILENO)". It checks *stdout*, not stdin. In your example, stdout is (presumed to be) a tty, so it has to work. You are either using old version of busybox (which one?), or run "cat scriptfile | more" in a situation when stdout is already redirected to a non-tty (pipe, file, etc). -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
