My Notes
How to substitute an old pattern with a new pattern in matched lines of all files inside a directory
Say old pattern is "/old.php",
and new pattern is "/new.php"
# find . -type f -print0 | xargs -0 sed -i 's|/old.php|/new.php|g'
(sed -i for inplace editing of the file)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment