Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

shellscript image leach example

Name: pr0ns 2007-05-05 12:19 ID:wZIMaG82

Can someone improve on this? If a picture is missing, this script downloads a 4k stub of nothingness. This works out great for renaming, but afterwards I must go in and manually delete all of the 4k files. Can this extra process be scripted? If so how?

#!/bin/bash

mkdir ~/MainPicDir
mkdir ~/PicDir1 | curl http://www.heartbreakers.info/[2000-2050]/01.JPG -o ~/PicDir1/#01.jpg |
mkdir ~/PicDir2 | curl http://www.heartbreakers.info/[2000-2050]/02.JPG -o ~/PicDir2/#01.jpg

cd ~/PicDir1

num=1
for file in `ls`;do
mv $file $num$"A"$".jpg"
num=$(($num+1))
done

cd ~/PicDir2

num=1
for file in `ls`;do
mv $file $num$"B"$".jpg"
num=$(($num+1))
done

cp -r ~/PicDir1/ ~/MainPicDir | cp -r ~/PicDir2/ ~/MainPicDir

rm -r ~/PicDir1 ~/PicDir2

p.s. I know I lose in life

Name: Anonymous 2007-05-07 15:14 ID:KoHJTyoP

>>22

Thinking this might have been some OSX faggotry, I booted up my PStriple and tried it. It still doesn't work. Everything is up to date. Perhaps with some moar reading and alcohol I'll know exactly where this went wrong.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List