You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shebang line claims that the script can be executed with /bin/sh, which is usually a POSIX compliant shell. But the script uses features that are bash features and not covered by POSIX. Most prominently it makes heavy use of echo -e which is not part of POSIX but supported by bash and some other shells. I suggest to either:
change the shebang line to explicitly declare that this script requires bash as the interpreter, or to
remove the bashism from the script to make it POSIX compliant
In Debian and derivatives like Ubuntu you can use the script checkbashisms to get a list of bash-only features that your script is using. Besides echo -e you also make use of ${PARAMETER//[0-9]}.
The text was updated successfully, but these errors were encountered:
@alkaris That's what "remove the bashism from the script" means, yes. But that's not enough. There are other things like ${PARAMETER//[0-9]} that would have to be replaced by something else.
Good noted! My rookie bad. I have used it on an OpenWRT router.
For now, I will change the shebang line. Ideally, it would be fully POSIX.
Sorry for the delay.
The shebang line claims that the script can be executed with
/bin/sh
, which is usually a POSIX compliant shell. But the script uses features that are bash features and not covered by POSIX. Most prominently it makes heavy use ofecho -e
which is not part of POSIX but supported by bash and some other shells. I suggest to either:In Debian and derivatives like Ubuntu you can use the script
checkbashisms
to get a list of bash-only features that your script is using. Besidesecho -e
you also make use of${PARAMETER//[0-9]}
.The text was updated successfully, but these errors were encountered: