You can also use a "here document"
help() {
cat <<'EOH'
my-script — does one thing well
Usage:
my-script <input> <output>
Options:
<input> Input file to read.
<output> Output file to write. Use '-' for stdout.
-h Show this message.
EOH
}
If the indentation bugs you, you can use a simpler sed trick to remove leading space so that you can indent it as desired:
help() {
sed -e 's/ //' <<'EOH'
my-script — does one thing well
Usage:
my-script <input> <output>
Options:
<input> Input file to read.
<output> Output file to write. Use '-' for stdout.
-h Show this message.
EOH
}