xnite

.bashrc alias for pulling IP's from a text file

Jan 20th, 2017
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. #example: pull /path/to/file.txt /path/to/save/to/ips.log
  2. pull()                                                                                
  3. {                                                                                    
  4.         cat $1 | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' > $2
  5. }
Advertisement
Add Comment
Please, Sign In to add comment