Tiny Core Linux

General TC => General TC Talk => Topic started by: mattrix on March 27, 2011, 11:13:06 PM

Title: [solved] CL info scrolls off the screen
Post by: mattrix on March 27, 2011, 11:13:06 PM
This is not particularly a TCL question but its driving me mad :'(
Things like,
mount --help | more

don't stop at each page.
I think this may be a busybox thing; as more works in other places.

How can I see the help page by page?

mount --help > mounthelp.txt doesn't work either.

thanks
Title: Re: CL info scrolls off the screen
Post by: tinypoodle on March 27, 2011, 11:33:14 PM
'less' would show... less   :P
Made me just settle with scrolling...
Title: Re: CL info scrolls off the screen
Post by: maro on March 27, 2011, 11:39:18 PM
Your problem is likely due to the fact that the information is written to STDERR (and not STDOUT). Your use of "COMMAND > FILE" or "COMMAND | PAGER" works only if "COMMAND" writes to STDOUT.

Solution: Either direct STDERR to file with "COMMAND 2> FILE" (e.g. via mount --help 2> mounthelp.txt) or merge the output of STDOUT and STDERR with "COMMAND 2>&1 | PAGER" (e.g. via mount --help 2>&1 | less).
Title: Re: CL info scrolls off the screen
Post by: mattrix on March 27, 2011, 11:43:52 PM
That worked, thanks

I thought it was something to to do with how busybox used stdout