Yeah, also watch out for invisible spacebar presses/spaces after the back slash, as these will lead to errors as well. Example given
–tx-out $(cat payment2.addr)+100000000 \
where represents the cursor position. If you can extend the cursor position beyond the slash ‘\’, this means any extra spaces after the backwards slash will be treated as special characters follow by a carriage return to the next line which will mess up the command, at least within the bash shell using any vim “deriviate”, including the C (and vim-script) re-written neovim. I don’t know about other editors like nano, but it has caused me problems in the past, these “invisible spaces” after ‘\’.
Maybe some editors are designed to ignore extra spaces after the backslash, or at least have that option - I don’t know.
If you copy and paste the command with extra space(s) after ‘\’ at the end of the line, it will work - no worries.
But, if you give the file ‘executable’ permissions and try to run it as a script, then that’s when you get the error(s).
You will also get errors if you add an extra ‘invisible’ line to the command:e.g.,
In this case, there is an extra last line of blank spaces between line n and the end of the file bounded by the first ~ after line n.
Regardless if you ‘copy and paste’ or run the file as an executable script/command, it will produce errors in both cases, in the former case it only happens if you happen to copy and paste the extra line produced, but that can be avoided. You can’t avoid that when running the command as a script.