Skip to content

Instantly share code, notes, and snippets.

@s3krit
Created October 18, 2018 16:39
Show Gist options
  • Save s3krit/25e884597f4aca0852909f4eaea456fe to your computer and use it in GitHub Desktop.
Save s3krit/25e884597f4aca0852909f4eaea456fe to your computer and use it in GitHub Desktop.
#!/bin/bash
filearg=""
for arg in $@
do
filearg="$filearg -F files[]=@$arg "
done
ret=$(curl -sf $filearg https://file0.s3kr.it/upload)
result=$(echo $ret | egrep -o 'file0.s3kr.it/[a-z0-9]{12}(\.[a-z]+)?' | sort | uniq)
for url in $result
do
echo "https://$url"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment