[Tfug] bash dl script

Brian Murphy murphy+tfug at email.arizona.edu
Wed Aug 27 18:49:32 MST 2008


Quoting James Hood <ebenblues at gmail.com>:
> I've found very few differences between writing bash and ksh scripts so
> learning bash will basically make you a ksh scripter as well. Now from an
> interactive shell standpoint, I much prefer bash over ksh (command tab
> completion, etc).
>
> Have others found this to be the case? What would make someone prefer ksh
> over bash? Not trying to start a flame war, just curious.


bash has always seemed a kitchen sink shell to me. (and not in a bad
way)  They've taken everything known to exist in shells and added it in
a bourne compatible way.  One of the cool things about ksh is the vi
style command line editing. (a great advance over no editing on bourne
shell or macro substitution in csh)  A quick check shows bash supports
this too for people who don't like that fancy gnu readline stuff.

There is one thing you need to be careful with in commercial unix.  Most
of them still come with an old bourne shell, barebones "posix" shell, or
ksh as the default root shell.  If you build your own bash to replace
it, make sure you statically link the executable and put it in /bin.
You never want to be in the situation where /usr doesn't mount and your
root shell is depending on libraries in /usr/lib.  You'll be booting
from CD into a recovery shell to fix things.

Brian

The opinions or statements expressed herein are my own and should not be
taken as a position, opinion, or endorsement of the University of
Arizona.






More information about the tfug mailing list