So if you want to extract all ip-adresses from a file use: grep -eo "((||1" \ I think the correct regex can be found on apama has it almost right, but that expression requires that the ipnumber is the only thing on the line, no leading or trailing space allowed, nor can it select ip's from the middle of a line. the accepted answer allows ip numbers like 999.999.999.999. All of the previous answers have one or more problems.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |