Byter, here is a more suitable way to achieve what you need, as well as some tips for other beginners.
First of all, you should not put your own shells only in any old place, especially / usr / bin. If you have a custom application, I suggest saving it to / opt or / usr / local / bin if you need to.
Secondly, this particular shell should not be a prerequisite for any of your applications, it does not serve a purpose different from the existing one.
Instead, see the following examples:
PROBLEM>
foo() { echo "A string that gets affected by auto-format, is a pretty long string"; } $foo >A string that gets affected by auto-format, is a pretty long string
Solution>
foo() { longString='A really long \nstring'; echo -e $longString } $foo >A really long string
OR use cat eof | EOL , which will work for you if you do not specify an indent with a hyphen "-" see:
foo() { cat <<-EOL really long string EOL } $foo >really long string
In conclusion> . This solves your problem by providing an unobtrusive way of using strings in bash.
source share