Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!pyrltd!tetrauk!paul From: paul@tetrauk.UUCP (Paul Ashton) Newsgroups: comp.unix.wizards Subject: Re: Why is 'more' giving the 'next file' prompt? Message-ID: <471@tetrauk.UUCP> Date: 3 May 90 23:05:16 GMT References: <1990May3.160744.25250@bath.ac.uk> Reply-To: paul@tetrauk.UUCP (Paul Ashton) Organization: Tetra Ltd., Maidenhead, UK Lines: 16 In article <1990May3.160744.25250@bath.ac.uk> exspes@bath.ac.uk (P E Smee) writes: > cat fred | csh -c 'cat >tempxxx ; more tempxxx' > >Before 'more' puts anything out, it gives the 'Next file (tempxxx):' >prompt. Why does it think tempxxx is the second file? What's the >first? > The first file is fred (stdin, which is not a tty so more's in filter mode) cat has read all stdin so more gets nothing and prompts for the next file. So for more not to prompt stdin must me a tty. eg cat fred | csh -c 'cat >tempxxx ; more tempxxx < /dev/tty' pity you haven't got pg -- Paul