Vim Tips -- Search and Replace
Did you ever wonder if there was an easy way to send an example file for someone to look at, but still keep your private information safe? Sure you can use a sed, or perl one-liner, as I discussed: using-bash-and-sed-to-modify-text-file.html , but why not use search and replace in vi / vim before publishing your info? That way you can see exactly what you are changing. Remember, while vim is installed by default on most Linux distros, is also available for Windows, and it is free -- http://www.vim.org Suppose you have part of a log file, or nmap output that contains real hostnames, a real domain name, and real IP addresses. You want someone to help you troubleshoot something, but you don't what to give the real info for everyone to see. Start with the info in a text file, such as this: Host realhost-1.realdomain.com (192.168.0.54) appears to be up. Host realhost-2.realdomain.com (192.168.0.55) appears to be up. Host realhost-3.realdomain.com (192.168.0.56) appears to be up. Host...