Delimiter @ for replacers
When you have to replace any char with /
in a linux editor you will write something like:
:%s/\//foo/g
The above code replace /
to foo
, you can use @
instead of /
to delimit the values for command %s
.
:%s@/@foo@g
It works on awk
, sed
, vi
and others.
This tip is from a nice guy, I'd like share it will you too.
Written by Shairon Toledo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sed
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#