PANGDU 胖嘟
楊景皓的工作日記: linux, debian, mysql, vim, php, javascript, python
Wednesday, April 10, 2013
linux grep and sed to find through files and replace a string
grep -rl oldstring path | xargs sed -i 's/oldstring/newstring/g
find /path -type f -exec sed -i 's/oldstring/newstring/g' {} \;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment