1

I have this file containing around 6700 IP addresses and I need them all extracted to a different file. I sadly can't find any solution out here so the file pretty much look like this:

open tcp 25565 159.69.73.167 1671466939
open tcp 25565 116.202.48.199 1671466939
open tcp 25565 95.216.24.98 1671466939
open tcp 25565 195.201.117.19 1671466939

but its sadly a bit longer than this.

2
  • 1
    You didn't provide an operating system or anything else. I am assuming Linux but assuming doesn't help future users find your answer. Commented Jan 4, 2023 at 22:25
  • 1
    cut -d' ' -f4 < input_file ?
    – GACy20
    Commented Jan 5, 2023 at 7:59

1 Answer 1

3

If the format is strict this awk script will do the work:

awk '{print $4}' input_file >output_file

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .