|
|
Subscribe / Log in / New account

checkbashisms

checkbashisms

Posted Dec 22, 2010 12:31 UTC (Wed) by epa (subscriber, #39769)
In reply to: checkbashisms by foom
Parent article: Introducing the "Debian's Automated Code Analysis" (DACA) project

Or, just as well, declare /bin/sh to be bash and have
a separate /bin/minimal_bare_bones_sh for the tiny
number of cases where it is truly needed.

Fifteen years ago bash might have been seen as bloated.
That really isn't an issue any more.


to post comments

checkbashisms

Posted Dec 25, 2010 5:07 UTC (Sat) by foom (subscriber, #14868) [Link] (1 responses)

POSIX sh is standardized. Regardless of what /bin/sh actually points to, or how bloated bash is or is not, if you write a script that depends on nonstandard extensions in bash, you should put #!/bin/bash at the top.

checkbashisms

Posted Dec 31, 2010 11:52 UTC (Fri) by epa (subscriber, #39769) [Link]

A little ironic that you use POSIX standardization as a reason for a particular shebang line, since the #! syntax is not part of POSIX at all.

I think you are probably right though - to keep everybody happy, if you want bash it's best to say what you mean.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds