How to output a string by using wildcards?
I'm trying to make a shell script, and for part of it I need to search through a file, find the ip in the file, and save ONLY the ip to another file. ( not the entire line that its on )
I understand grep has wildcards, where I could do something like, "grep (...........) traceroute-output for an ip address. Any ideas? Thanks. |
grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
does this help' |
man grep
/-o Cheers, Tink |
great. Thanks for the quick help.
|
All times are GMT -5. The time now is 06:10 PM. |