What are the best search and replace tools in linux?
I want to find an easy way.
Thanks
You can use rpl .
It will replace strings with new strings in multiple text files. It can work recursively over directories and supports limiting the search to specific file suffixes.
rpl [-iwRspfdtx [-q|-v]] <old_str> <new_str> <target_file(s)>
find
for finding files/directories
grep
or ack
[1] for searching files
sed
for search/replace in files
awk
and cut
for slicing/dicing text
for anything non-trivial I usually reach for perl
find
和sed
是经典工具。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.