Variable assignment in sh

Garance A Drosehn drosih at rpi.edu
Sat Feb 4 03:49:03 UTC 2017


On 3 Feb 2017, at 17:25, James B. Byrne wrote:

> On Wed, February 1, 2017 19:21, Garance A Drosehn wrote:
>
>>
>> On something of minor tangent, if you're writing scripts in
>> either 'sh' or 'bash', you may find the following web site
>> helpful:         http://www.shellcheck.net
>
>
> I just wish to clarify something here.  What I am doing is attempting
> to reuse a one-liner that has one conditional in it.  I do not
> consider that to be scripting or programming.  I am just piping
> a few tools together and checking if anything comes out the end.

Understood, but even those trivial one-liner tasks might be improved
by pasting them into shellcheck.  I've had shellcheck point out things
I'm doing which "almost always" work, but will fail depending on the
filenames my one-liner happens to be working on.

Also note that I **did** say that my suggestion was a minor tangent,
and thus I realize it was not necessarily on-topic.  :)  I just
thought that some people who read this thread might find the site
to be helpful.

Cheerio.

-- 
Garance Alistair Drosehn                =     drosih at rpi.edu
Senior Systems Programmer               or   gad at FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA


More information about the freebsd-questions mailing list