Freedom to Write
Friday 16 October 2009
replace a string in a file with another
replace string in a group of files and movr the original files to file.bkp to be safe.
perl -i.bak -wpl -e 's/include/exclude/g;' datasource-4*.xml
Note:
Option "p" is for automating printing of rest of the file along with the strings which are newly placed.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Tweets by @sriramperumalla
No comments:
Post a Comment