I have some really long and complex command containing both types of quotes: " and ', for example like:
cd folder && command --hel="p_me:'please' anyone:'here?'" ; command2 --end='my:"trouble"'
I want to throw it into the echo command. But it does not work easily, I have to insert it into another quotes and escape some quotes inside the command. This should be okay usually, but unfortunately this time I can not change the command itself (and escape any quotes inside).
How to echo a command containing both types of quotes without its modification? How to escape the quotes on-run for echo?
You could use a heredoc:
Example:
I don't know what
jsub
is and I couldn't find it in the repositories for 14.04, but unless it runs a shell or can interpret shell syntax, I don't think this will work the way you think it will.