[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: problem with more and scripts

On Thu, 12 Oct 2006 12:53:57 -0400
"Roel Lascano" <roellascano gmail com> took out a #2 pencil and

> I'm running FC5, and I've got an odd problem with a bash script
> I've got. The problem can be summarized fairly easily with a two
> line script:
> #!/bin/bash
> /bin/more /etc/profile 2> /tmp/errorlog
> When I do this the first full screen gets printed, then more
> quits.  This is a trivial example, but the script does several
> things and captures stderr to a logfile; under ksh the script
> works fine... under bash it doesn't.
> Any ideas?

Although I can not speak as to why it works in ksh but not in bash,
have you tried using 'less'? 'less' has more functionality than
'more' and does behave properly.

It may be some terminal variable that causes 'more' to cease, as
it's reached the end of output as far as 'more' is concerned.
'less' is more advanced (as stated in the man page) and this is
likely the reason why.


Alex White
ethericalzen gmail com
Life is a prison, death is a release

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]