How do you escape a quote in a shell script?
Answer
To quote a generic string with single quotes, perform the following actions:
Answer
To quote a generic string with single quotes, perform the following actions:
- Substitute any sequence of non-single-quote characters with the same sequence with added leading and trailing single quotes: ‘aaa’ ==> ”aaa”
- Escape with a backslash every preexisting single quote character: ‘ ==> ‘