I am working with an application that runs commands in bash. This is the "template" it is using:
sh -c '<command> "<argument>"'
Please note that I cannot edit the quotes, only thing I can edit is the command and argument. I cannot escape the dollar sign either.
This "template" works fine unless there is a dollar sign in the argument:
sh -c 'echo "x=test$test"'
gives the following output:
x=test
How can I get the exact output, which is:
x=test$test
I could do this if I could switch the quotes:
sh -c "echo '"'x=test$test'"'"
x=test$test
Any way to accomplish this?