well, you might start with
http://www.bolthole.com/solaris/ksh.html
--
[Trim the no-bots from my address to reply to me by email!]
[ Do NOT email-CC me on posts. Pick one or the other.]
S.1618 http://thomas.loc.gov/cgi-bin/bdquery/z?d105:SN01618:@@@D
http://www.spamlaws.com/state/ca1.html
> well, you might start with
> http://www.bolthole.com/solaris/ksh.html
Nah, much better, read Philip's Gran Turismo guide ;)
I didn't do it right, obviously, as I've been working my way up (and
tuning) a lime green new beetle. Ok, it's not a great track car, but
it kind of looks hilarious with 340bhp zipping past mean-looking
japanese coupes...
--
Chris Morgan <cm at mihalis.net> http://www.mihalis.net
Temp sig. - Enquire within
while shell scripting is good to know, perl is much more powerful and
not that much harder to learn.
Just my $.02
-Duy
It's much harder to learn how to program perl CORRECTLY.
"correctly", as in "readable, and maintainable by others"
The following book contains comprehensive information about ksh88 and
ksh93 and is the definitive text on that subject:
'The New Kornshell' by Morris Bolsky & David Korn
--
Rob
¥喊`昂,父,喊`昂喊`昂,父,喊`昂喊`昂い喊`昂ぃ
Which shell? For plain old Bourne shell, I recommend Portable Shell Programming
by Blinn .
--
Griff Miller II | |
Manager of Information Technology | If you're too open-minded, |
Positron Corporation | your brains might fall out. |
griff....@positron.com | |
>On Sun, 14 Apr 2002 22:25:58 -0500, duon...@nospam.tc.umn.edu wrote:
>>
>>while shell scripting is good to know, perl is much more powerful and
>>not that much harder to learn.
>
>It's much harder to learn how to program perl CORRECTLY.
>"correctly", as in "readable, and maintainable by others"
What makes you think that?
Perl syntax is natural and easy to learn; if you have any problems
with it, I'll they stem from features Perl took from /bin/sh
or the bunch of other tools it relies on.
/bin/sh syntax is actually much worse:
+ variables aren't clearly marked as such
+ its use of whitespace and quotes are not defensible in a court of law
+ the lack of predefined functions for almost anything (say, a test)
means you have to learn lots of additional syntax in order to get
anything done (test, expr, awk, sed, cut, sort, ...)
Furthermore,
+ variable scoping is primitive
+ practically no data structures
Perl scripts can be expected to be much more readable and maintainable
than equivalent /bin/sh scripts. They will be shorter, have more
consistent syntax, and can be organised better.
If a Perl script is unreadable or unmaintainable,
you can safely assume that
+ the author's /bin/sh scripts aren't any better
+ the Perl script is so powerful that /bin/sh is no alternative
(I'm interested to see evidence or arguments to the contrary.
I can't think of anything.)
To the original poster: have a look in news:comp.unix.shell.
--
Reinier
>On Sun, 14 Apr 2002 22:25:58 -0500, duon...@nospam.tc.umn.edu wrote:
>>
>>while shell scripting is good to know, perl is much more powerful and
>>not that much harder to learn.
>
>It's much harder to learn how to program perl CORRECTLY.
>"correctly", as in "readable, and maintainable by others"
What makes you think that?
Perl syntax is natural and easy to learn; if you have any problems
with it, they are probably with features taken from /bin/sh
or the bunch of tools it relies on.
"natural (language) syntax" is antithesis to "maintainable by others",
because it will take on language-like structure, rather than logical
structure.
>if you have any problems
>with it, they are probably with features taken from /bin/sh
>or the bunch of tools it relies on.
>...
>If a Perl script is unreadable or unmaintainable,
>you can safely assume that
>
> + the author's /bin/sh scripts aren't any better
> + the Perl script is so powerful that /bin/sh is no alternative
I've seen plenty of perl scripts that could have been done in sh just as
easily.
Your first point is irrelevant. If they use perl for everything, then
obviously, their sh scripting is non-existant.
I'm not saying its impossible to write clean perl code. I'm saying
there's so much BAD perl code out there, people will follow what they see,
the majority being bad code. bad breeds bad.
phi...@bolthole.no-bots.com wrote:
>On 20 Apr 2002 17:01:13 GMT, r...@win.tue.nl wrote:
>>phi...@bolthole.no-bots.com wrote:
>>>It's much harder to learn how to program perl CORRECTLY.
>>>"correctly", as in "readable, and maintainable by others"
>>
>>What makes you think that?
>>
>>Perl syntax is natural and easy to learn;
>
>"natural (language) syntax" is antithesis to "maintainable by others",
>because it will take on language-like structure, rather than logical
>structure.
You may have a point there, but I'm not convinced.
In Perl, I can write
if ($foo < $bar) {
&doit($foo);
}
alternatively as
&doit($foo)
if $foo < $bar;
(an analogy to the do { } while { } construct present in many languages)
or as
$foo < $bar and &doit($foo);
(a /bin/sh-ism).
I don't think "logic" gives us a preferred syntax, but you can argue that
the second syntax violates the principle of evaluating things in the order
in which they appear in the source, while the third violates the principle
that expressions should be either tests or actions, but not both. Still,
I'm not convinced that their use makes Perl code any harder to read.
>>if you have any problems
>>with it, they are probably with features taken from /bin/sh
>>or the bunch of tools it relies on.
>>...
>>If a Perl script is unreadable or unmaintainable,
>>you can safely assume that
>>
>> + the author's /bin/sh scripts aren't any better
>> + the Perl script is so powerful that /bin/sh is no alternative
>
>I've seen plenty of perl scripts that could have been done in sh just as
>easily.
>Your first point is irrelevant. If they use perl for everything, then
>obviously, their sh scripting is non-existant.
Not true. After thousands of lines of /bin/sh scripting,
I find the Perl language superior to /bin/sh in every way,
My point was: if Perl scripts are bad, /bin/sh equivalents will be worse.
>I'm not saying its impossible to write clean perl code. I'm saying
>there's so much BAD perl code out there, people will follow what they see,
>the majority being bad code. bad breeds bad.
All I argued in the message you're replying to is: Perl is better
for your coding habits than /bin/sh in every way.
--
Reinier Post