Re: How to enforce the "more" command
- From: "James" <jzheng22@xxxxxxxxx>
- Date: 23 May 2006 10:45:03 -0700
Thanks Chris.
I wondered if there is any other command to pause the output.
"pg" is not working either.
James
Chris F.A. Johnson wrote:
On 2006-05-23, James wrote:
Chris F.A. Johnson wrote:
On 2006-05-23, James wrote:
ksh on AIX 5.2
I have a script, test.sh, which contains
ls -l /tmp | more
"more" works well. However, once I pipe another script's
ouput to test.sh, e.g. ./anotherscript.sh | ./test.sh
"more" is not working anymore. The contents of /tmp
was displayed without being paged.
I don't know why it is not being paged; it is on my system.
However, whatever it's behaviour. there is no point to piping
anything to test.sh as it doesn't read its stdin. You will always
see the contents of /tmp.
I tried -c and -l option of "more" but no luck. Is there any
"-p Subcommand" helpful here? Any hints?
[please don't top post]
sorry, I did not explain it clearly, what I did is
test.sh contains more than just one line of "ls"
When I do
tee -a /tmp/logfile | ./test.sh | tee -a /tmp/logfile
to log both input and output, "more" is not
functioning.
Since you are piping the outpus of test.sh to another command,
neither its stdin nor its stdout is connected to a terminal,
therefore more does not pause.
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
.
- Follow-Ups:
- Re: How to enforce the "more" command
- From: Chris F.A. Johnson
- Re: How to enforce the "more" command
- References:
- How to enforce the "more" command
- From: James
- Re: How to enforce the "more" command
- From: Chris F.A. Johnson
- Re: How to enforce the "more" command
- From: James
- Re: How to enforce the "more" command
- From: Chris F.A. Johnson
- How to enforce the "more" command
- Prev by Date: Re: Remvoing Empty Directories
- Next by Date: Re: How to enforce the "more" command
- Previous by thread: Re: How to enforce the "more" command
- Next by thread: Re: How to enforce the "more" command
- Index(es):
Relevant Pages
|