# run on linux
sed -i 's/正则表达式/替换后内容/g' hello.txt
# run on mac os x
sed -i "" 's/正则表达式/替换后内容/g' hello.txt