Skip to content

Instantly share code, notes, and snippets.

@hampusn
Created June 9, 2016 21:22
Show Gist options
  • Save hampusn/bc448df8372aebba7998b66165d8a9e4 to your computer and use it in GitHub Desktop.
Save hampusn/bc448df8372aebba7998b66165d8a9e4 to your computer and use it in GitHub Desktop.
Bash-script to download an image from placehold.it
#!/usr/bin/env bash
####################################################
# Script to download a dummy/placeholder image.
####################################################
if [ -z "$1" ]; then
echo "Missing argument with the pixel dimensions (try 'dummy 250x200')"
exit 1
fi
DIMENSIONS=$1
wget -O "$DIMENSIONS.png" "http://placehold.it/$DIMENSIONS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment