help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] starting a central bash script repository


From: John Kearney
Subject: Re: [Help-bash] starting a central bash script repository
Date: Sat, 06 Apr 2013 22:42:04 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

Am 06.04.2013 22:07, schrieb Peng Yu:
>>> Bash code is not reusable in any sane way.  You can't pass array names
>>> to functions, for example (this is the #1 problem with writing "libraries"
>>> of bash code).
> Besides the following feature, don't forget that bash scripts can also
> be reused.
>
>> http://lists.gnu.org/archive/html/bug-bash/2012-07/msg00047.html
I don't know what you do with your bash code but 95% of my bash code is
in libs and all of that is reused.

1. If is possible to pass array names function, and you can even modify
them, though I find it rarely if ever necessary to do so.

2. Even if I were to accept your premise that no lib functionality is
possible without being able to pass array by reference to a function. a
lib would still make sense as an opus, a body of reference if you will
how standard operations should be  done in a shell.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]