title: use curl/bash command in jq
body: <p>I am trying to get a list of URL after redirection using <code>bash</code> scripting. Say, <code>google.com</code> gets redirected to <code>http://www.google.com</code> with <code>301</code> status.
  What I have tried is:</p>
  
  <pre><code>json='[{"url":"google.com"},{"url":"microsoft.com"}]'
  
  echo "$json" | jq -r '.[].url' | while read line; do
      curl -LSs -o /dev/null -w %{url_effective} $line 2&gt;/dev/null
  done
  </code></pre>
  
  <p>So, is it possible for us to use commands like <code>curl</code> inside <code>jq</code> for processing JSON objects.
  I want to add the resulting URL to existing JSON structure like:</p>
  
  <pre><code>[
    {
      "url": "google.com",
      "redirection": "http://www.google.com"
    },
    {
      "url": "microsoft.com",
      "redirection": "https://www.microsoft.com"
    }
  ]
  
  </code></pre>
  
  <p>Thank you in advance..!</p>