PIPEMORE

pipemore.pl is intended to be used as the last of a series of piped commands. It captures the data on the pipe (STDOUT) and displays it in a scrolled text window where you may search or save it. This has the advantage over more because when you close the window, the data disappears and does not remain to clutter your xterm. For instance. you might do:

  grep open *
  
  pipemore.pl:        if (open(FH, ">$filename")) {
  pipemore.pl:            my $msg = "Error on open '$filename': $!";
  pipemore.pl:        if (open(FH, "| $printcmd")) {

Snapshot of pipemore.pl This only generated a few lines of output and as long as your xterm doesn't scroll, you can easily refer to the grep results. Consider, however, when the command returns hundreds of lines. Finding something or referencing it later becomes more of a problem - that's when pipemore.pl comes in handy. At times it can be very handy to pipe data to a window, keep it around for a few minutes and then close the window and not have it cluttering your xterm.

Pipemore.pl takes a number of options (use 'pipemore.pl -h' to get the details). You might want to set up an alias like this one that I use:

  #   This is CSH syntax from my .tcshrc file
  alias pipe pipemore.pl -n -bg lightsteelblue \$\*

Pipemore is a single Perl script and requires Perl (version 5.5+) and the Perl/Tk package to be installed. Note that this is requires X windows and will not work in your normal console mode.

Releases are available at SourceForge.





Isn't Pipemore Just Another less (or more)?

Yes, I know about 'less' and use it all the time (as a 'more' replacement). The two tools are similar in some respects, but for me the function I wanted most was to get a NEW window where the data could stay open so I could refer to it later and usually copy/paste from it.

For instance I might start a 'make' with something like 'make |& pipemore.pl' (CSH syntax) and let it run (maybe even fork it). Later I come back to see how it has gone. If there is no error, I close it. If not, I can refer to it as I try to figure out what's going on. Sometimes these Pipemore windows lay around for a several days until I get things sorted out.

In the same way when developing Perl applications, I'll pipe the application output into pipemore.pl and leave the logs open for days while I iterate through with subsequent runs. The old logs are good for comparing results or as a reminder of something more I need to do.

I also find it useful for various "one liners" as I try to come up with a series of piped commands to do something I want. Often times the output of the commands is an echo of a command that is close to what I want. I'll pipe this into pipemore.pl and when it's finally right, save it to a file which I can then edit and massage even further into a shell script to do something more complex.

Could I figure out some other way to do these things? Sure. I had a tool in the 80s that provided something similar to Pipemore and really liked this way of working. When that tool disappeared, I finally recreated it as pipemore.pl.


Direct questions to: Terry Gliedt tpg@hps.com

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. See http://www.gnu.org/copyleft/gpl.html