This question already has an answer here:
- How do I use variables in a sed command? 2 answers
I am trying to replace a word in a text file with the current username. I am trying to do this with "sed" using $USER, but it keeps actually writing "$USER" in the text file instead of my username.
sed -i 's/test/$USER/g' ~/.gtkrc-2.0
Can anyone help? Thank you in advance.