How can I escape double quotes inside a double string in Bash?
For example, in my shell script
#!/bin/bash dbload=\"load data local infile \\\"\'gfp
Check out printf...
#!/bin/bash mystr="say \"hi\""
Without using printf
echo -e $mystr
Output: say "hi"
Using printf
echo -e $(printf '%q' $mystr)
Output: say \"hi\"