[CODE title="Linux"]
ip=$(curl -s https://api.ipify.org)
echo "$ip"
[/CODE]
Biraz once de aklıma bunu Windows'a uyarlamak geldi. Ben de yaptım.
[CODE title="Windows"]echo off
cls
curl https://api.ipify.org/
pause > nul[/CODE]
Fakat bu sadece Windows 10 1809 uzerinde calışacak. Daha altında calışmayacak.
Ben de big brain taktiğiyle Powershell ile dosya indirme yontemiyle yaptım.
[CODE title="Windows ama curl olmadan"]echo off
cls
powershell Invoke-WebRequest -Uri https://api.ipify.org/ -OutFile ip.txt
type ip.txt
del ip.txt
pause > nul[/CODE]
Ve evet. Artık Windows 7 ve ustu uzerinde calışan bir şey yaptım

Eğer bunu bir .bat dosyanızda değişken olarak ayarlamak icin:
[CODE title="Değişken"]echo off
cls
powershell Invoke-WebRequest -Uri https://api.ipify.org/ -OutFile ip.txt
set /p bakbubirvariable= < ip.txt
del ip.txt
echo %bakbubirvariable% bak bu senin ip adresin.
pause > nul[/CODE]