[12 / 3 / ?]

No.51056352 ViewReplyReportDelete
Hi /g/ can you help me a bit?

I have this shell script to download images from imgur and it works fine.
#!/bin/bash

for ((i = 0; i <= 1000; i++)); do
echo "Grabbing page $i"

wget -q "http://imgur.com/r/rule34lol/page/$i"; -O - | grep 'class="post"' | cut -d\" -f2 | while read id
do
echo "Downloading $id.jpg"
wget -q -c "http://i.imgur.com/$id.jpg";
done
done

echo "Done"


How could I just modify it so that I could specify the folder where pictures are being saved? So that the .sh would not need to be in the download directory?