Created
June 9, 2010 22:20
-
-
Save farhaven/432273 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
datestamp=$(date +%d-%m-%y) | |
if [ -d $datestamp ]; then | |
exit -1 | |
fi | |
mkdir $datestamp | |
for f in engines/*; do | |
url=$(./$f) | |
ftype=$(echo $url | awk -F'.' '{print $NF}') | |
name=$(echo $f | cut -d'.' -f1 | cut -d'/' -f2) | |
wget -O "$datestamp/$name.$ftype" $(./$f) | |
done | |
### und das z.b. als engine (fuer xkcd) | |
wget -O - xkcd.net 2> /dev/null | grep hotlink | cut -d' ' -f5 | cut -d'<' -f1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment