2017-11-01 linux sed replace 图灵1234567891011sed -i 's/\\"//g' filesed -i 's/\\\\\//\//g' filesed -i 's/"\[{""json"":""/\[/g' filesed -i 's/{""json"":""//g' filesed -i 's/"",""mt"":[0-9]*}\]"/\]/g' filesed -i 's/"",""mt"":[0-9]*}//g' file Use double quotes so that sed would expand variables.sed "s|\$ROOT|${HOME}|" abc.sh shell变量在双引号内会被解析 在单引号内不会被解析 How to use variables in a command in sed? Newer linux sync folder by rsync Older redis-delete-all-keys