-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf Mardorf wrote:
> Gustin Johnson wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Ralf Mardorf wrote:
>>  
>>>> http://www.google.ca/search?q=posix%20arrays
>>>>         
>>> http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2007-09/msg00320.html
>>>
>>>
>>> :)
>>>     
>> Did you read the reply?
>> http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2007-09/msg00322.html
>>
>>
>> Here is an interesting bit from the first reply:
>>
>> If you want to claim that a piece of shell code is running on all
>> POSIX conformant shells you have to restrict to the subset of features
>> defined by POSIX.
>>
>> Limits on maximum array sizes are not even constant withing a specific
>> shell. AFAIR, you can only rely on ~1000 on ksh88 while on ksh93 you
>> have 4096 guaranteed (but the limit can be even higher depending on
>> the version).
>>
>>     (or written for the "POSIX shell"), since another POSIX-compliant
>>     shell might not implement arrays...?
>>
>>
>> There's no *the* "POSIX shell". There's the POSIX standard and a
>> couple of shells that support the features defined by the standard.
> 
> Hi Gustin :)
> 
> yes, that's why I added this link. It's something I read similar on
> German before. The POSIX standard doesn't know arrays, but even most sh
> (links) do know arrays. Arrays are common, but if somebody would be safe

Some shells support it, others do not.  sh does not equal bash.

> that his script will run on every shell he shouldn't use arrays, but it
> shouldn't be a problem to include arrays, because nearly every Linux
> install seem to support bash. Btw. by a German post it's written that
> Suse and Debian sh knows arrays too, Ubuntu seems to be an exception.
> Something I like. There should be a shell to test a script on POSIX
> standard only.

First, read the BASH FAQ.  This particular question is also dealt with
in the advanced bash scripting guide.  Of particular interest is the
section called "Portability Issues".  Your answer is there.
> 
> Taking a look at my Suse 11.1, sh is a link to bash, taking a look at my
> Suse 11.0, sh is a link to bash, taking a look at one of my 64 Studio
> 2.1, sh is a link to bash. That seems to be the reason that nearly

Debian and Ubuntu now symlink dash instead of bash.
<snip>
> Today everybody simply use arrays. Good luck, by random I learned the
> "eval" alternative on POSIX standard and while learning I might stay on
> this.
> 
Use whichever makes sense for you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFK1f9GwRXgH3rKGfMRAtjfAJ94v6hwLVrfmDtDW60vspDL0d+5lACfb7vF
EIFjP0iV2SjbQuS8iw4+upA=
=CnHG
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users

Reply via email to