Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Bash Scripts To Shell

I have a list of scripts written in Bash, and now i need to convert them to Shell scripts. I know bash is an extended implementation of the Shell specification, and so, i'm looking for some specification of the extension implemented in Bash, namely, what's in Bash that is not part of the Shell specification, so i could go over my scripts and make the appropriate modification. Is there such a document? Alternatively, any other suggestion on how to do the conversion will be greatly appreciated.

like image 723
zuckermanori Avatar asked Dec 14 '22 11:12

zuckermanori


1 Answers

The shellcheck tool (with a shebang of #!/bin/sh) will catch many bash-isms.

Any that aren't caught should probably be filed as bugs against the project. If they aren't prohibitive to implement they should get added in reasonable time. The author is fairly responsive.

like image 175
Etan Reisner Avatar answered Dec 25 '22 17:12

Etan Reisner