Mike McCarty wrote:
John Summerfied wrote:
Mike McCarty wrote:
Which is why, my friends, when I need a quickie one-off I
*never* write a script. My longest scripts are no more than
20 lines or so. As soon as I need an "if" I switch to C
and write in a language which is documented, understandable, and
portable between systems.
When I left the IBM mainframe world in 1981 I left JCL behind,
You could have been using Jol, which is much nicer.
In the early 70s I wrote a set of assembler macros to generate JCL
(similar to sysgen). Way better than catalogued procedures.
My boss thought it a great joke when I submitted a job that submitted
50 or so jobs to copy tapes, then went off to college. It seems the
computer centre staff got excited at having to do some work, and he
took the call.
You could also have bene using TSO command procedures. Note to others;
imagine JCL as assembler-like, and TSO (with MVS, before MVS was
different) command procedures as akin to a well-structured
third-generation language compled with do/end blocks. Statements
looked like this:
allocate file(fred) dataset(good.stuff) new -
space (1000 100) block(4096) round
and have never looked back. Writing long involved scripts is
a throw-back to the Jurassic age. Join the 21st Century and
abandon shell scripts.
Just my $0.02 worth.
How many lines of C is this worth:
for f in $(find unix/ common/ -type f -name \*.h -o -name \*.cxx \
|xargs grep -lw secTypeVncAuth); do vim -c /secTypeVncAuth $f; done
I have no idea, since it is essentially incomprensible goop.
Ah, there's your real problem: you no spika da language!
I'd not expect anyone who's made an effort to learn about the shell,
simple scripting, and the standard *x commandline utilities to have a
problem with it.
That's the sort of thing I type at the commandline.
Well, I don't want to waste the brain cells.
How long would this take in C?
Nobody would claim that all programming languages are equally
suited to all tasks.
[rest of horrible example cut as unworthy of reasonable
individual line by line comment]
I'd be ashamed if my C code were so incomprehensible and
We obviously have different ideas about what good programming
really means. To almost quote Hoare: There are two ways to
write programs. One can make them so simple that there
obviously are no defects, or one can make them so complicated
that there are no obvious defects. The former is much more
and nobody does the latter.
If you don't understand the language, you're not qualified to judge the
quality or qualities of the code.
I grant you the regular expressions in the second can be a little
daunting, but the shell script isn't the place to document how regular
expressions work, and of you know how they work then understanding those
Expecting annotations in such a script is like expecting a French poet
to provide English annotations.
[email protected] [email protected]
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/
do not reply off-list