Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!killer!usl!usl-pc!jpdres10 From: jpdres10@usl-pc.UUCP (Green Eric Lee) Newsgroups: comp.unix.wizards Subject: Pager in the shell Message-ID: <103@usl-pc.UUCP> Date: Sun, 18-Oct-87 02:24:29 EDT Article-I.D.: usl-pc.103 Posted: Sun Oct 18 02:24:29 1987 Date-Received: Wed, 21-Oct-87 23:20:28 EDT References: <9779@brl-adm.ARPA> Organization: Univ. of Southwestern La., Lafayette Lines: 33 Distribution: Keywords: Summary: Expires: Sender: Reply-To: Followup-To: In message <9779@brl-adm.ARPA>, mills%cc.uofm.cdn%ubc.csnet@RELAY.CS.NET (Gary Mills) says: >Has anyone succeeded in putting a pager into the shell? I am getting >a bit tired of appending ` | pg' to any command line that I suspect >will generate more than a screen of output. I'm not sure if that's smart. After a short time of using page-mode terminals connected to an IBM mainframe, one is usually overdue for a sanity check :-). Also, there's some problems with detirmining what exactly starts a page. For example, you type "mailx". And get dumped to the mail reader prompt. You type "h" to see the titles. Hmm, that should count as a part of a page, right? Then you type "3" to read message number 3. Two lines into reading message number 3, the !#$"$"$!"$ thing stops and asks for "---MORE?---". In which case you're tempted to do like that guy in San Francisco did (blew away his IBM PC with a .44 Magnum :-). As for implementation, there's two things you can do: Make stdin and stdout pipes to your shell, or implement paging at the kernel level. For pipes, there's no way of knowing if your characters have been read, and thus, you don't know when the first page began (you can say that a page starts after the last read() call). And of course I won't even begin to try to justify cluttering up the kernel with yet more useless junk (that's currently done perfectly well at the user level, albeit by typing an extra three characters -- big deal). -- Eric Green elg@usl.CSNET from BEYOND nowhere: {ihnp4,cbosgd}!killer!elg, P.O. Box 92191, Lafayette, LA 70509 {ut-sally,killer}!usl!elg "there's someone in my head, but it's not me..."