Skip to content

Instantly share code, notes, and snippets.

@barraponto
Created January 31, 2019 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barraponto/8e5a92506de3e03bea0141410b1844b7 to your computer and use it in GitHub Desktop.
Save barraponto/8e5a92506de3e03bea0141410b1844b7 to your computer and use it in GitHub Desktop.
#!/bin/bash -
set -o nounset # Treat unset variables as an error
for filename in *.jpg; do
curl -H "X-API-Key: ${API}" -F "image_file=@./${filename}" -f https://api.remove.bg/v1.0/removebg -o "nobg_${filename}.png";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment