Pectus Excavatum Pectus Excavatum - 8 months ago 73
Bash Question

shell bash, how to echo variables inside single quotes

I am just wondering how I can echo a variable inside single quotes (I am using single quotes as the string has quotation marks in it).

echo 'test text "here_is_some_test_text_$counter" "output"' >> ${FILE}

any help would be greatly appreciated


You can't.

 echo 'test text "here_is_some_test_text_'"$counter"'" "output"' >> ${FILE}