Michael L Torrie wrote: > Bash is just wonderful at putting existing tools together using > processes and pipes. While I could do everything in Python in this > case, bash is the more comfortable language for doing this kind of > thing. Especially since in my script, most of what I need to do is run > other commands, like, fdisk, fsck, mount, and so forth.
I agree that bash is frequently easier, but its documentation is scattered and IMHO bash is much more prone to bugs. Even the earlier one-liner has a significant bug; it will fail if the path happens to contain a space. Fortunately there's an obvious solution: abspath=$(readlink -f "$fn") For me, the numerous warts like this usually tip the balance in favor of a general purpose language. Shane /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
