Skip to content

blog.Gudynas.lt

About everything

Menu
  • Home
  • AS215899
  • OpenWebRX SDR
  • ADS-B Tracker
  • About sdr.Gudynas.lt
  • Contacts
Menu

Export IP:PORT from random text file to the list

Posted on 2023-03-03 by Justas

You can use a combination of Linux commands to filter out IP:port pairs from a text file and create a list.

Assuming that the IP:port pairs in the file are separated by a space, you can use the grep command to filter out lines that match the IP:port pattern, and then use the cut command to extract the IP:port pairs from the matched lines. Finally, you can use the sort command to sort the IP:port pairs in ascending order.

Here is an example command that you can use:

grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]{1,5}\b" file.txt | cut -d " " -f 1 | sort

Replace file.txt with the path to your text file. This command will output a sorted list of unique IP:port pairs from the file, with one pair per line.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

  • sdr.Gudynas.lt Project (6)
  • AS215899 (1)
  • Linux (42)
  • Windows (1)
  • Uncategorized (2)

Archives

  • August 2025 (2)
  • March 2025 (1)
  • November 2024 (2)
  • January 2024 (2)
  • December 2023 (1)
  • October 2023 (1)
  • September 2023 (2)
  • May 2023 (1)
  • April 2023 (1)
  • March 2023 (1)
  • August 2022 (1)
  • July 2022 (1)
  • March 2022 (1)
  • December 2021 (5)
  • November 2021 (5)
  • September 2021 (4)
  • August 2021 (1)
  • July 2021 (1)
  • May 2021 (1)
  • April 2021 (1)
  • January 2021 (1)
  • October 2020 (2)
  • August 2020 (1)
  • May 2020 (1)
  • November 2019 (2)
  • September 2018 (10)

Recent Posts

  • Looking for BGP IPv6 transit in Lithuania
  • SDR.Gudynas.lt upgrades, ADS-B receiver installed
  • Ready for Winter, Network upgrades, and What was done in 2024 for sdr.gudynas.lt project
  • 2023-10-15 Some SSTV decoding on 10/11m SDR
  • Enabling auto-adjust waterfall colors by default OpenWebRX

Recent Comments

  • Bruce MAYO on About sdr.Gudynas.lt OpenWebRX project
  • BT on About sdr.Gudynas.lt OpenWebRX project
  • Bernd on About sdr.Gudynas.lt OpenWebRX project
March 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Aug   Apr »
© 2025 blog.Gudynas.lt | Powered by Minimalist Blog WordPress Theme