alexew@watdcsu.UUCP (02/26/87)
In article <1172@sphinx.UChicago.UUCP> cjdb@sphinx.UChicago.UUCP (Charles Blair) writes: > > >I just downloaded the recently posted more.com. When I type filename | >more.com, I get more without an indication of how much of the rest of >the file there is to be typed. When I type | more filename, I get >"Invalid number of parameters" from PC-DOS 3.2, then the file is >typed, and more _does_ indicate how much of the file is left. I'm not >up to thinking this through. Can someone tell me what's going on? > >(Note: DOS's more I have renamed, so I'm not inadvertently using it at >any point.) >-- >Charles Blair ..!ihnp4!gargoyle!sphinx!cjdb >The University of Chicago PMRCJDB@UCHIMVS1.Bitnet I have not used the mentioned version of more, but this programs seems to be a more UNIX compatible version, supporting 'MORE fn' as well as the piped system. Thus 2 points come to mind: 1) DOS's more supports piping only. In a pipe the target program cannot know how much data is coming through the pipe. This is the reason no size remaining is possibly when you pipe input into MORE. (any version ) 2) The 'type | more fn' command is really two commands. DOS replies to the type request with an error, as no file has been specified. The normal output is piped to more. More, however, ignores it, as it defaults to a command line parm, namely 'fn', and merrily prints the file. Thus, you should be able to use 'more fn' as your command. ------------------------------------------------------------------------- Alex E. Wielhouwer, | --------------- Department of Systems (Waterloo JANET group) | | * _ * _| Computing Services | | _\% / _\% /| "I don't want to achieve | | _%/ ~ _%/ | immortality through my work. | | / /~\ / | University of I want to achieve immortality | | // \\ | Waterloo through not dying." | \ // * \\ / Woody Allen | \//_\% _\\/ | \ _%/ / "Go Warriors, Go!" | \__/__/ "Go Athenas, Go!" -------------------------------------------------------------------------
coulter@hpclisp.UUCP (02/26/87)
You will get the same behavior on UN*X. If the argument to more is a file, it can seek to the end of the file to find out how long it is. If more is getting its input from stdin, it doesn't know how long the input is going to be. I think the number of arguments error is coming from the type command when you don't give it a file argument. -- Michael Coulter ...ucbvax!hpda!hpcllld!coulter