Home How to replace a text string with dollar sign $in Linux? Reply: 0 # How to replace a text string with dollar sign$ in Linux?

user513
1#
user513 Published in May 26, 2018, 9:38 pm
 I am trying to replace a text '../../Something' with '$Something' in all .txt files in current directory.Let me know where I am going wrong? find . -name "*.txt" | xargs sed -i "s/..\/..\/Something/\'\$Something'/g"  Error - Variable name must contain alphanumeric character I also tried with but doesn't work- find . -name "*.txt" | xargs sed -i "s/..\/..\/Something/\\\$Something/g"  Any suggestions for correct command?
 You need to login account before you can post.
Processed in 0.390132 second(s) , Gzip On .