Sed-i "s/original string/new string/g" ' grep original string-rl. '
Format: Sed-i "s/lookup field/replace field/g" ' grep lookup field-rl path '
Turn:
Bulk Replace file content under Linux 1, ready-made data format on the network: sed-i "s/lookup field/replacement field/g" ' grep lookup field-rl path ' linux sed bulk replace strings in multiple files sed-i "S/oldstring/news Tring/g "' grep oldstring-rl yourdir ' Example: Replace the www.admin99.net in all files under/home to Admin99.net sed-i" s/www.admin99.net/ Admin99.net/g "' grep www.admin99.net-rl/home ' exp:sed-i" s/shabi/$/g "' grep shabi-rl./' 2, add yourself additional 2.1 to the text within 1.txt of the file" GA Rden "Replace with" Mirgarden "# sed-i" s/garden/mirgarden/g "1.txt //sed-i very simple 2.2 replace" garden "in all files in the current directory with" Mirgarden "# # # s Ed-i "s/garden/mirgarden/g" ' ls '//is actually the LS out of multiple filenames
Turn from:
Http://www.cnblogs.com/end/archive/2012/05/24/2517131.html
Linux bulk replaces strings contained in all files