3 ms·
I would just like to mention, that in order to really take the pain out of portable scripting, the easiest way to go is python scripts - and forget about the di
by Create 16y ago
I would just like to mention, that in order to really take the pain out of portable scripting, the easiest way to go is python scripts - and forget about the differences between win32, bash, csh and the rest.
- bch 16y agoThat's what I do (s/Python/Tcl/). I feel pretty comfortable doing it, but a -little- uneasy. I feel like I'm cheating; I usually prescribe (and follow) "as dumb as possible (but no dumber)" rule, and use /bin/sh as my interactive shell to keep from relying on non-portable "creature-features". Using /bin/sh satisfies the "as dumb as possible..." rule because it's basic, standard, and everywhere. However, as soon as a shell script starts getting moderately complicated, I feel more comfortable moving to something (Tcl) that's (to my mind) less obtuse and less surprising. edit: and then I read http://news.ycombinator.com/item?id=2271004 http://news.ycombinator.com/item?id=2271004 further below, which makes Tcl (or python, or ...) look even better.
- zem 16y ago> I usually prescribe (and follow) "as dumb as possible (but no dumber)" rule to what end?
- bch 16y agoTo my mind, the "dumb" tools are the simple ones that often ship w/ Unix, and using them forces understanding of principles, rather than rote memorization of meta-commands. From that (the hope is that) one can _understand_ what a problem is, and now to fix it.
- georgecmu 16y agoThis works great as long as your definition of portability extend only to systems with python (or perl, or tcl, or php, or ruby) installed. Shell is the least common denominator.