Automating screenshot sharing

I used to create screenshots via scrot tool and and then publish them somewhere like my S3 bucket or to imagesharing sites. But so far it needed two separate actions. Following simple script helps to automate this task.


scrot '%Y%m%d-%H%M%S.png' \
    -e 's3cmd put -P $f s3:// && \
    urxvt -hold -e cowthink -W 80$f'

It creates screenshot, uploads it to my amazon account with s3cmd and then shows me the link.