Subject: | |
From: | |
Reply To: | |
Date: | Mon, 12 May 1997 11:08:08 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Gavin writes:
>Jeff writes:
>> shell/iX> wc -l /DEV/SOURCE/* | tail -1
>> wc: cannot execute: Arg list too long
>
>Unix sucks.
No, Unix is fine. Programmers who don't check boundary conditions suck.
This is one instance where MPE, more or less by accident, comes out way
ahead of Unix. Since the MPE CI doesn't think its job includes expanding
file lists, and since lots of C programs are written expecting file lists
in command lines to be expanded, the good folks who wrote the MPE C
run-time library implemented a solution. If you link your MPE C program
with LIBCWC.LIB.SYS before whatever other libraries you normally use, the
wildcard expansion is done by the library so the command line length
limitation isn't an issue when an expanded file list includes hundreds or
thousands of files.
At least on Unix, there _is_ a standard way to get a list of files for a
program to operate on. On MPE, every program that needs to operate on
multiple files has to implement this logic itself. It would have been
nice if HP had provided a nonprivileged interface to the directory scan
routines back in 1973.
-- Bruce
--------------------------------------------------------------------------
Bruce Toback Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc. (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142 | But ah, my foes, and oh, my friends -
Phoenix AZ 85028 | It gives a lovely light.
[log in to unmask] | -- Edna St. Vincent Millay
|
|
|