Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. !/usr/bin/env bash
  2. test_album="http://imgur.com/a/SRkmI"
  3. test_album2="http://imgur.com/a/S2NNI"
  4.  
  5. #album=$1
  6. album=$test_album2
  7. echo $album
  8.  
  9. # Complicated at first, but not difficult at all
  10. title=`curl -s $album | grep "</title>" | sed 's/ - Imgur<\/title>//' | sed 's/  //g' | sed 's/ /_/g' | sed 's/[,\{\/]//g'`
  11. echo $title
  12.  
  13. # bullshit because unzip doesn't support stdin
  14. mkdir "$title" ; curl "${album}/zip" > "${title}.zip" ; unzip -d${title}./ "$title.zip" ; # rm "$title.zip"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement