Shell programming
Posted Dec 1, 2012 22:51 UTC (Sat) by
man_ls (subscriber, #15091)
In reply to:
Shell programming by dlang
Parent article:
Quotes of the week
you want to clear a directory before you start doing other things, in shell rm -r dir does it, how many lines of code does it take to do it in Perl or Python?
Actually it is probably one line also, but the thing is -- I don't remember which line, while
rm -r is always at my fingertips. (A quick trip to Google says that
shutil.rmtree should do the trick in Python).
In three months they re-wrote the 20 line shell script into a 200 line Perl script, with everything that actually did something being a system() call that invoked the shell commands that were in my initial script [...]
Sounds like a
daily wtf to me.
[Pedantic corner {actually not a corner but a footnote of sorts, or more properly an addendum}: "least common denominator" is a number greater than any in the input, while "greatest common divisor" is smaller than the input. E.g. lcd(4, 6) = 12; gcd(4, 6) = 2.]
(
Log in to post comments)