Re: Read Total lines in an ASCII file [message #33334 is a reply to message #33175] |
Wed, 18 December 2002 14:51   |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
wmc@bas.ac.uk writes:
(stuff deleted)
>> Spawning "wc -l" is the slowest. Note that this is on Windows 2000 with the
>> Cygwin "wc" command. Unix is much faster at spawning subprocesses than
>> Windows, so method 1b may be competitive there.
> How interesting. Thanks for doing all this. I would certainly hope that
> spawn would be a bit faster under unix. I have a slight feeling that there
> are options to spawn that can make it a bit faster (something about not
> copying the env perhaps?).
The way this is done in Unix is to use the /noshell command, e.g.
spawn, 'wc -l '+filename, result ;Slower
spawn, ['wc','-l',filename], result, /noshell ;Faster
Bill Thompson
|
|
|