Externe IP-Adresse: Unterschied zwischen den Versionen

Aus Foxwiki
K (Textersetzung - „Kategorie:Regular expression“ durch „Kategorie:Regular Expression“)
K (Textersetzung - „lynx“ durch „linux“)
Zeile 5: Zeile 5:
  $ '''curl -L -s --max-time 10 http://checkip.dyndns.org | grep -Eo -m 1 '([[:digit:]]{1,3}.){3}[[:digit:]]{1,3}' '''
  $ '''curl -L -s --max-time 10 http://checkip.dyndns.org | grep -Eo -m 1 '([[:digit:]]{1,3}.){3}[[:digit:]]{1,3}' '''


  $ '''lynx -dump http://www.formyip.com/ | awk "/IP is/" | awk {'print $4'}'''
  $ '''linux -dump http://www.formyip.com/ | awk "/IP is/" | awk {'print $4'}'''
   
   
[[Kategorie:IPv4]]
[[Kategorie:IPv4]]
[[Kategorie:Regular Expression]]
[[Kategorie:Regular Expression]]

Version vom 22. Januar 2024, 16:16 Uhr

Öffentliche IP-Adresse ermitteln

$ wget -O - -q icanhazip.com
1.2.3.4
$ curl -L -s --max-time 10 http://checkip.dyndns.org | grep -Eo -m 1 '(digit:{1,3}.){3}digit:{1,3}' 
$ linux -dump http://www.formyip.com/ | awk "/IP is/" | awk {'print $4'}