Pectus Excavatum Pectus Excavatum - 10 days ago 5x
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}