Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 20 lines (16 sloc) 642 Bytes
#!/usr/bin/env bash
mkdir -p ~/Pictures/bing-wallpapers/
cd ~/Pictures/bing-wallpapers/
# for more urls, goto
# download a theme, use a text editor to open it, and find the url.
curl "" | grep -o 'url="[^"]*"' | sed -e 's/url="\([^"]*\)"/\1/' | sed -e "s/ /%20/g" > tmp.txt
#read file line
while read line
fileName=$(echo $line | sed -e "s;.*/\([^\/]*\)$;\1;")
if [[ -f $fileName ]]; then
echo "$fileName already exists" > log.txt
curl -O $line;
done < "tmp.txt"