in reply to Print to Less Screen

IMnsHO, it's the user's business to pipe or not the output of your program to a pager of his/her own choice. What if the user wants to redirect the results to a file? How do you handle that?

Jenda
Enoch was right!
Enjoy the last years of Rome.

Replies are listed 'Best First'.
Re^2: Print to Less Screen
by bigbot (Beadle) on Jun 04, 2011 at 10:59 UTC

    I don't disagree but nobody has complained so far. The data is pretty much impossible to look at without less. I could certainly add an option for raw output.

    The bigger issue is that I'm still loading the results entirely into memory and this is a problem when a large amount of data is returned. I still can't figure out how to use a file handle in combination with split (which I need in order to parse the DB output). Really the only thing I can think to do is just create a few temp files myself and manage them manually because it just seems to complicated to get these various methods to work.

      Let the users run the script via a shell script that pipes its output to less.

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.