:: Re: [DNG] A shell script for networ…
Góra strony
Delete this message
Reply to this message
Autor: Tom Cassidy
Data:  
Dla: KatolaZ
CC: dng
Temat: Re: [DNG] A shell script for network connections
Hi KatolaZ,

I would suggest running setnet.sh through the shellcheck program to lint the script.

You can access it online[1] or it should be available in the repository[2].

It has support for checking portability issues[3] (eg. bashisms, POSIX compliance) depending on which shell is specified in the shebang line, which sounds like it would help here.

Tom


[1] https://www.shellcheck.net/ <https://www.shellcheck.net/>
[2] https://github.com/koalaman/shellcheck#user-content-installing <https://github.com/koalaman/shellcheck#user-content-installing>
[3] https://github.com/koalaman/shellcheck#portability <https://github.com/koalaman/shellcheck#portability>

> On 1 Jan 2017, at 04:40, KatolaZ <katolaz@???> wrote:
>
> On Sat, Dec 31, 2016 at 05:15:56PM +0000, KatolaZ wrote:
>> On Sat, Dec 31, 2016 at 10:38:48AM +0000, KatolaZ wrote:
>>
>> [cut]
>>
>>>
>>>
>>> Hi Steve,
>>>
>>> thanks for your encouragement. bash is currently a requirement, since
>>> I am using a few non-posix little things. So if you want to test it
>>> and report bugs, please use it under bash atm since a few things will
>>> not work at all with dash. I hope I will be able to port it to
>>> posix-sh soon.
>>>
>>
>> Hi All,
>>
>> it turns out that my last statement was wrong. To my own surprise,
>> setnet.sh seems to be already posix-compliant with a very slight
>> modification. In particular, it is sufficient to comment out the
>> keyword "function" in function declarations, which is done with
>>
>> sed -r -e 's/^function\ /##function\ \n/g' setnet.sh > setnet.dash
>>
>
> Actually, it is not that easy, and there are indeed a few things to
> iron out, but it should not be too difficult, I believe :)
>
> StayTuned
>
> KatolaZ
>
> -- 
> [ ~.,_  Enzo Nicosia aka KatolaZ - GLUGCT -- Freaknet Medialab  ]  
> [     "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
> [       @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
> [     @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
> [ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng