Skip to content

Instantly share code, notes, and snippets.

@PotcFdk
Last active February 28, 2016 20:16
Show Gist options
  • Save PotcFdk/e26129503797e6843a1b to your computer and use it in GitHub Desktop.
Save PotcFdk/e26129503797e6843a1b to your computer and use it in GitHub Desktop.
while [ true ]; do
while read line; do
id=$(echo "$line" | grep Location | sed 's/^Location.*\/\/ipfs\.pics\/\([^#]*\).*$/\1/g')
if [ -n "$id" ]; then
echo -n " - "
if grep -Fxq "$id" ipfs-pics-ids.txt; then
echo ".. $id"
else
echo -n "++ "
echo "$id" | tee -a ipfs-pics-ids.txt
fi
fi
done < <( curl -sI $(printf 'https://ipfs.pics/random %.0s' {1..15}) )
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment