[Cialug] [OT]: Shell script globbing
Matthew Nuzum
newz at bearfruit.org
Thu Dec 20 14:52:14 CST 2007
On Dec 20, 2007 1:58 PM, Major Stubble <major.stubble at gmail.com> wrote:
> It is the default shell for Solaris. Other Unix systems have some
> version of it available. Linux and BSD typically have pfksh, which
> to my eyes seems less restrictive than the pure ksh's of the Unix world.
>
> I myself will typically use sh before ksh or bash for most scripts
> since it is the most restrictive of all. That said, I won't work in
> a shell environment without my vi keys, so if I am working in bash,
> it have to 'set -o vi'.
>
> All that said, I have never been on a Unix system without ksh. It is
> also true that I have not been on a Linux system without bash.
>
You need to be careful though. If you assume bash then you should use
#!/bin/bash for your shebang. In Ubuntu 6.10 and newer, /bin/sh is linked to
dash, which is much more restrictive and tries not to make too many
non-posix assumptions. Its also much faster than bash, which is why it's
linked as /bin/sh. (to make boot up faster, which it apparently did)
cf. https://wiki.ubuntu.com/DashAsBinSh
--
Matthew Nuzum
newz2000 on freenode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20071220/ed65970b/attachment.htm
More information about the Cialug
mailing list