1, replace all aaaa to bbbbb in file 1.xml
root@li9:/var/htdocs/sitemaps# sed -i 's/aaaa/bbbbb/g' 1.xml
2 replace all aaaa to bbbbb in files *.xml
root@li9:/var/htdocs/sitemaps# sed -i 's/2011-02-02/2011-02-09/g' *.xml
* -i : sed will directly modify the file if it finds anything to replace
* s : substitute the following text
* g : global, match all occurrences in the line
Subscribe to:
Post Comments (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
I used 7z to zip this file under Windows, try to unzip it under linux [ang@walker temp]$ gunzip 2011.sdf.zip gunzip: 2011.sdf.zip: unkno...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...
sed -i 's/2010-06-30/2011-03-09/g' *.xml
ReplyDelete%s/\zs.*\ze<\/drs_db_host>/aaa/g
ReplyDelete