scripting fun
Les Mikesell
lesmikesell at gmail.com
Fri Jun 6 21:35:21 UTC 2008
Smoot Carl-Mitchell wrote:
> On Fri, 2008-06-06 at 11:23 -0700, Steve Lamb wrote:
>
>> I never forget that. However my firm belief is that shell is not a
>> simple tool nor is it suited for complex tasks and thus, in spite of its
>> ubiquitous inclusion in Unix is not suited for the philosophy that it
>> spawned. I find Python[*] simpler and better suited for complex tasks.
>
> Yep. But remember, us old Unix hackers from 20 years ago did not have
> all those nifty languages at our disposal. :-)
Perl must be getting close and it can do the same trick of throwing
everything into hashes to weed out duplicates and quickly check for
existence.
But we have always had a large assortment of program tools at the shells
disposal, so if the job maps into the things those do well (sort -u/comm
-13 in this case) you are all set. And if you use a higher level
language you are likely to waste a lot of time re-inventing sorts and
comparisons that were done right decades ago.
> Often what I end up doing is to do the heavy lifting of a programming
> task in a procedural language and then have a simple shell script as a
> driver.
That's what you are supposed to do, but if the task is anything that
anyone else ever needed to do, the tools are probably already in /usr/bin.
--
Les Mikesell
lesmikesell at gmail.com
More information about the ubuntu-users
mailing list