[geeks] bash string matching
Sridhar Ayengar
ploopster at gmail.com
Thu Jun 5 20:10:51 CDT 2008
Jochen Kunz wrote:
> On Wed, 4 Jun 2008 18:44:30 -0400
> Shannon Hendrix <shannon at widomaker.com> wrote:
>
> Most likely this will not help solving the question, but...
>
>> Some posix shells like bash
> bash has several extensions over POSIX.
> "[[ expression ]]" is such an extension.
>
> You have to avoid such extensions if you want to write true POSIX
> compliant shell scripts. If you don't, your scripts will be bash
> scripts, not shell scripts. (shell scripts in the sense of script that
> can executed by any POSIX /bin/sh.)
>
> I have seen to many "shell scripts" written by Linux weenies that start
> with "#!/bin/sh" but are actually bash scripts...
>
> A bourne shell, that limits it self mostly to the POSIX spec, is
> the /bin/sh of NetBSD. It is available on Linux as "ash" or as part of
> busybox.
Most of mine start with #!/bin/kah.
Peace... Sridhar
More information about the geeks
mailing list