curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Simplify the complicated curl command for updating the ddns record.

From: Hongyi Zhao via curl-users <>
Date: Fri, 29 Jan 2021 15:47:39 +0800


Currently, I'm using the following command to update the dyndns A
record on the remote provider's DNS server from my intranet machine:

while :; do
  curl -X POST \
       -d "$(
         curl -s -X POST \
                 jq '

                    + (.records[] | select(.name == "free") |
"&record_id=" + .id + "&record_line_id=" + .line_id +
"&sub_domain=free" )
                    ' |
                 sed -re 's/^"//;s/"$//'
       )" | jq .
  sleep 30

As you can see, it's a rather complicated curl invocation. Any
hints/notes/suggestions for simplify such job with curl?

Assoc. Prof. Hongyi Zhao <>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China
Received on 2021-01-29