Bash: fetch IP Address in a file using GNU grep

You can use below command

grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" filename.txt 

Comments

Popular posts from this blog

grep: unknown device method

Uploading files to FTP/SFTP using CURL

How to find outgoing IP in Linux ?