search and replace files oneliner
add this to your .bashrc or .zshrc
alias pie="perl -p -i -e "
Usage
basic
pie 's#[search]#[replace]#g' [filenames]
search and replace http
with https
from files with name ended with html in this git repo
pie 's#http#https#g' `git ls-files|grep html$`
Written by yachi
Related protips
2 Responses

I prefer using sed -i
.
over 1 year ago
·

good tip! didn't know the -i option, always wondering how to do that with sed
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#