Perl : Search and Replace text from a file
Very useful in command line, specially when you have a big file to go through.
perl -pi.bak -e "s/text to find/text to replace/g" *.txt
UPDATE: thanks telemachus for the correction!
Written by Asanka
Related protips
1 Response
@telemachus Thanks for the informative comment! I have updated the post.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Perl
Authors
Jean-Remy Duboc
12.1K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#