Skip to content

Instantly share code, notes, and snippets.

@valer-cara
Last active August 29, 2015 14:11
Show Gist options
  • Save valer-cara/53feb5559964e73de2a5 to your computer and use it in GitHub Desktop.
Save valer-cara/53feb5559964e73de2a5 to your computer and use it in GitHub Desktop.
#!/bin/bash
while read line; do
segments=(${line// - / })
id=${segments[0]}
asset_type=${segments[1]}
attch_id=${segments[2]}
url=${segments[3]}
if curl -s -f -I $url 1>/dev/null; then
echo "FOUND EXISTING ASSET(id=$id:attach_id=$attch_id) AT:" $url
else
echo -n "."
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment