obfsh is a shell script obfuscator. It is quite flexible and can obfuscate any type of shell script.
The obfuscated script version is printed to stdout. The original script is not modified.
-c < n >, insert deceiving comments for every n line
-d < n >, insert deceiving code for every n line
-e < n1 >-< n2 >, prepend each line with a random number of spaces ranging
from n1 to n2
-f < file >, file to obfuscate
-g < n1 >-< n2 >+< n3 >-< n4 >, insert gibberish header and footer of n2 lines
long with each line n1 signs long, n3-n4 being range of characters
to generate from. See the manual for more details.
-h, usage and options (this help)
-i, remove blank lines, comments, leading and trailing spaces and tabs
-j < n1 >-< n2 >, insert n1 empty lines for every n2 line
-l, see this script"