You are not logged in.
Really Simple Script Here For Ur Wall , enjoy!
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]
then
echo "***** USAGE :: $0 A B *****"
echo "***** A :: page number to start with *****"
echo "***** B :: page number to stop upon *****"
exit
fi
#replace 1280x800 (note it appears twice in this script below, line 9 AND 15) with your screen resolution
DIR=$HOME/BG/skin.be
URLFILE=$DIR/urls
INDEX=$1 #page number to start with
LIM=$2 #page number to stop upon
let COUNT="$LIM"-"$INDEX"+1
SIZE=1280x800
while [ "$INDEX" -le "$LIM" ]
do
tput sc
echo -n "***** COUNTING DOWN :: $COUNT *****"
##get pic url
curl -s http://www.skins.be/tags/$SIZE/page/$INDEX/ | awk -F \" '/betathumbnails/{ gsub(/betathumbnails/,"wallpapers");print $4 }'| awk -F '-' '{gsub($NF,"1280x800-"$NF);print}' >> $URLFILE
((INDEX++))
((COUNT--))
tput el1;tput rc
done
## image downloading starts
aria2c -d $DIR -i $URLFILE
mv $URLFILE "$URLFILE"_"$1"_"$2"
Last edited by lolilolicon (2009-04-24 04:54:41)
This silver ladybug at line 28...
Offline
Why do I get the gnawing feeling something in this code will brick the OS?
Offline
I don't know, best try on a LiveCD first.
For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page
Offline
Why do I get the gnawing feeling something in this code will brick the OS?
LIKELY
IT IS A BRICK
This silver ladybug at line 28...
Offline
Why do I get the gnawing feeling something in this code will brick the OS?
Codophobia?
The script looks harmless to me.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
The only thing that caught my attention was tput, and it looks as though that's there to control the way the terminal behaves for the countdown code. Looks like a nice little script
Offline
Why do I get the gnawing feeling something in this code will brick the OS?
Don't run scripts as root, and your Linux is generally safe from brickhood.
Offline
The only thing that caught my attention was tput, and it looks as though that's there to control the way the terminal behaves for the countdown code. Looks like a nice little script
Thanks,HashBox
the tput little trick is what i've just got from Mr. Google back yesterday.
tput sc #Save the cursor position
echo -n "blablabla"
tput el1 #Clear to beginning of line
tput rc #Restore the cursor position
Well, the script is for practical purpose only!! no scripting technique included ....
Last edited by lolilolicon (2009-04-24 04:11:00)
This silver ladybug at line 28...
Offline
Nice use of that, I looked it up (tput) after I posted and saw that's what it was doing handy trick to remember.
Offline
Paranoia keeps me safe
Offline
Yes My Thirsty Plstic Moniter Was Thirsty For Human Being Fit.
Thanks For Fiklling Sc Rtpt!!!
Offline