This may sound novice but I tried everything to get this to work.
I want to print a word with single quotes : 'John' in shell script. I cant replace /bin/bash -l -c
as this part of code is run by Java and I have to pass the shell command as a string. I tried with echo -e
option as well.
/bin/bash -l -c 'echo "'John'"'
The output I want is:
'John'
I tried escaping the single quotes but nothing helped so far. Any ideas?
No comments:
Post a Comment