Thread View: comp.unix.shell
2 messages
2 total messages
Started by rouben
Wed, 28 Nov 1990 17:26
Why does more(1) not leave an exit status?
Author: rouben
Date: Wed, 28 Nov 1990 17:26
Date: Wed, 28 Nov 1990 17:26
15 lines
1187 bytes
1187 bytes
On a couple of different systems I have tried, more(1) always exits with status 0. I would have expected more(1) to exit with a not-zero status when invoked with a non-existent file as its standin. Both cat(1) and tail(1) exit with status 1 when trying to open a non-existent file. Why not more(1)? Is this due to an oversight or due to a conscious decision? Does anyone know? -- Rouben Rostamian Telephone: (301) 455-2458 Department of Mathematics and Statistics e-mail: University of Maryland Baltimore County bitnet: rostamian@umbc Baltimore, MD 21228, U.S.A. internet: rostamian@umbc3.umbc.edu
Re: Why does more(1) not leave an exit status?
Author: Felix Lee
Date: Wed, 28 Nov 1990 23:02
Date: Wed, 28 Nov 1990 23:02
14 lines
1015 bytes
1015 bytes
If more(1) or less(1) were to produce a different exit status for each different type of exit action, you could build intelligent wrappers around your pager. 0 - normal exit (falling off the bottom) 1 - quit (q) 2 - next file (:n) 3 - previous file (:p) (and various error exits) And then something like "zmore" would be able to deal with multiple files properly. And you might rewrite "rn" to allow using an external pager, rather than its baroque internal version. -- Felix Lee flee@cs.psu.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads