News for hackers. Stuff that matters.
Re:Free DDNS with Cloudflare and a Cronjob by macote on Saturday July 27, 2024 @12:49PM (#41087777)
This is how I use it in my bash script:

  current_ip=$(curl -s -X GET https://1.1.1.1/cdn-cgi/trace | grep -Po "(?<=ip=)(.*)")
Re:Free DDNS with Cloudflare and a Cronjob by networked on Saturday July 27, 2024 @03:01PM (#41088560)
I find awk more clear for this kind of job. You can replace

  grep -Po "(?<=ip=)(.*)"
with

  awk -F= '$1 == "ip" { print $2 }'
Re:Free DDNS with Cloudflare and a Cronjob by macote on Sunday July 28, 2024 @08:45AM (#41092824)
Thanks for that, I agree.