WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [solved] CL info scrolls off the screen  (Read 2489 times)

Offline mattrix

  • Newbie
  • *
  • Posts: 14
[solved] CL info scrolls off the screen
« 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
« Last Edit: March 27, 2011, 11:46:30 PM by mattrix »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: CL info scrolls off the screen
« Reply #1 on: March 27, 2011, 11:33:14 PM »
'less' would show... less   :P
Made me just settle with scrolling...
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: CL info scrolls off the screen
« Reply #2 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).

Offline mattrix

  • Newbie
  • *
  • Posts: 14
Re: CL info scrolls off the screen
« Reply #3 on: March 27, 2011, 11:43:52 PM »
That worked, thanks

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