>>> Jan Pokorný <jpoko...@redhat.com> schrieb am 23.09.2015 um 22:30 in
Nachricht
<20150923203005.ga10...@redhat.com>:
> On 23/09/15 15:38 +0200, Ulrich Windl wrote:
>>>>> Vladislav Bogdanov <bub...@hoster-ok.com> schrieb am 23.09.2015 um
15:24
>>> 23.09.2015 15:42, dan wrote:
>>>> Did a small test:
>>>> ---------------test.sh----------------
>>>> controld_start() {
>>>>      local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
>>> yep, that is a bashism.
>>> 
>>> posix shell denies assignment of local variables in the declaration.
> 
> This is supported by checkbashisms's finding (v2.15.5):
> 
> $ checkbashisms -p test.sh 
>> script test.sh does not appear to have a #! interpreter line;
>> you may get strange results
>> possible bashism in test.sh line 2 (local foo=bar):
>>     local addr_list=$(echo AF_INET 10.1.1.1 AF_INET 10.1.1.2)
> 
>> In times of BASH it's hard to get POSIX shell documentation.
> 
> Oh, really?
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html 

Thanks for the pointer! What I wanted to says is: When reading the BASH
documentation, it's increasingly hard to find out what is POSIX and what iS
BASHism.

> 
> It doesn't seem to recognize the concept of "local" declaration,
> though.
> 
>> The last we had was from HP-UX. But the problem seems to be more $()
>> than assignment it seems.
> 
> That documentation recognizes $() form.
> 
> -- 
> Jan (Poki)




_______________________________________________
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to