#!/bin/bash function uploadImage { curl -s -F "image=@$1" -F "key=486690f872c678126a2c09a9e196ce1b" https://imgur.com/api/upload.xml | grep -E -o "(.)*" | grep -E -o "http://i.imgur.com/[^<]*" } scrot ~/Pictures/scrot.png uploadImage ~/Pictures/scrot.png | perl -pe chomp | xclip notify-send "Image uploaded, link in selection"