preece@ccvaxa.UUCP (08/08/85)
> > ps: K&P on this topic suggest using "pr" as a columnising filter. > > To my mind, "pr" is a paginator, its just as bad to make a paginator > > produce columns as some side effect as it is to make a directory > > listing program produce columns as a side effect - but of course, > > this was in "pr" from the beginning, so it is blessed... > It seems to me that a program for paginating might have to worry about > columns, but, yes this is probably not the best place to put a > columnator. On the other hand, it is possible to use the columnator > from pr from other programs, where with ls it's at very least kind of > difficult (create a file with the name of each line, do a ls -Cf, and > hope that there aren't two files with the same name? :-) ---------- How can you separate columnising from paginating? Clearly you can't columnise first, then page (you'd like the right column of a page to follow from the left column, not from the bottom of the left column of the last page). Nor can you page first, then columnise. You need a global process that alternates between grabbing enough material for one page and formatting it for display. That requires either a more complicated shell than Unix has or that the processes be turned into one program. It might be possible to embed the global knowledge in a shell script, but it would be a real pain. I think this is an example of something that is best done as a program. I tend to agree that ls should NOT do columnising for this same reason. Its columnising is wrong for pagination (it has to assume an infinite page length). -- scott preece gould/csd - urbana ihnp4!uiucdcs!ccvaxa!preece