You could use grep to pull them out.
grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' file.txt
More Related Contents:
- What’s the magic of “-” (a dash) in command-line parameters?
- Remove duplicates from text file based on second text file
- Recursively change file extensions in Bash
- When should I wrap quotes around a shell variable?
- Why do you need ./ (dot-slash) before executable or script name to run it in bash?
- How do I write standard error to a file while using “tee” with a pipe?
- bash regex with quotes?
- Find and kill a process in one line using bash and regex
- RE error: illegal byte sequence on Mac OS X
- What does $@ mean in a shell script?
- Forcing bash to expand variables in a string loaded from a file
- Using the star sign in grep
- How to find out line-endings in a text file?
- How do I use the lines of a file as arguments of a command?
- Extract substring using regexp in plain bash
- How do you find the original user through multiple sudo and su commands?
- How to concatenate multiple lines of output to one line?
- How can I remove the last character of a file in unix?
- Managing log files created by cron jobs
- How to run a shell script on a Unix console or Mac terminal?
- How to check if a file is empty in Bash?
- What does ‘\K’ mean in this regex?
- Should PATH contain directories or full paths to binaries?
- Execute a command without keeping it in history [closed]
- Multiplication on command line terminal
- Difference between shell and environment variables
- How to change date format in sed?
- What are the rules for valid identifiers (e.g. functions, vars, etc) in Bash?
- Grep and regex – why am I escaping curly braces?
- Find all files with name containing string [closed]