title: curl from url and rename to random uuid
body: <p>i have the following command to curl a list of urls but I want to rename the output files to something else, as the original name is really long and results in the error below:</p>
  <p>command:</p>
  <pre><code>jq -r '… | .[]' | xargs -I{} curl -O {}
  </code></pre>
  <p>error:</p>
  <pre><code>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file
  Warning: 270230751_944073806238863_7984852070388291566_n.jpg?stp=dst-jpg_e35&amp;_n
  Warning: c_ht=example.njrsnnkjnrjgngkrnngrggk&amp;_nc_cat=111&amp;_nc_ohc=Ch26T4U5kDIAX
  Warning: 8viWsL&amp;edm=AABBvjUBAAAA&amp;ccb=7-4&amp;ig_cache_key=MjczOTA2MDk4MDU3MTIyNjQ1N
    0 92492    0     1    0     0      1      0 25:41:32 --:--:-- 25:41:32     1
  curl: (23) Failed writing body (0 != 1)
  </code></pre>
  <p>how to pass some argument to curl so that it renames the file to a smaller name eg 16 digit uuid or something like <code>njfnjsnf48u8</code> but not too common as there can be upto 1000 files being downloaded at once.</p>