-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27 Apr 2008 at 16:00, Denys Vlasenko wrote:

From:                   Denys Vlasenko <[EMAIL PROTECTED]>
To:                     [email protected]
Subject:                Re: Operation of more command
Date sent:              Sun, 27 Apr 2008 16:00:29 +0200
Copies to:              "Michael D. Setzer II" <[EMAIL PROTECTED]>

> 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.
> 

It does work fine when using it on a Fedora system with busybox, but 
doesn't work when booted from the kernel.org kernel and using the /dev/tty1, 
but then same thing happens when I copy the Fedora8 more command to 
the cd. I just don't know why? 

The is busybox 1.10.1.

> 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


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:[EMAIL PROTECTED]                            
  mailto:[EMAIL PROTECTED]
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

[EMAIL PROTECTED] CREDITS
SETI 5,269,727.070797 | EINSTEIN 1,573,038.609732 | ROSETTA 
480,077.992597


-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8 -- QDPGP 2.61c
Comment: http://community.wow.net/grt/qdpgp.html

iQA/AwUBSBP+8CzGQcr/2AKZEQLLDgCgqhdra5sjIUwPCqSHB3BkiRewCF8AoOHg
BMPhmPLZgU0N+6sh8GgPVTYc
=67+E
-----END PGP SIGNATURE-----
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to