Download with browse with bash and wget

2010-05-09 1 min read Bash Fedora

Been pretty busy for last couple of days. Will be busy for another few days, but here’s something to munch in the meantime (Script may need changes depending on the type of file you want to download or the site you are browsing, but the chnages should be minimal):

file=”/tmp/temp.dir”
url=”URL Here”
IFS=’
’
cont=”y”
while [ $cont != ”n” ]
do
name=””
wget ”$url” -O $file -o /dev/null
for i in $(grep href $file |grep -v Parent)
do
name=${i##href=”}
name=${name%%”>
}
echo $name
if [[ $name == *gz ]]
then
cont=”n”
fi
done
if [ ! $name ]
then
echo ”No files here.. Exiting”
exit -1
fi
echo
if [ $cont == ”n” ]
then
echo ”Enter the filename for download :”
read file
fi
echo ”Select one of the options:”
read product
url=”$url/$product”
echo ”About to get $url”
done
wget ”$url” -O $file -o /dev/null

Continue reading

Transfer all the google feed URLs to rss2email.

2010-05-09 1 min read Fedora Linux

Next step in restoring my settings was to get the working rules and all the blogs into rss2email. I have subscribed to more than 150 blogs. So, adding all of them manually was difficult.

For a time like this, I subscribe to all the blogs using google reader and then add them to rss2email. So I had quickly exported the google feeds list and then had to find a way to extract the URLs for the blog to the rss2email. The command to add a url is r2e add, so I wrote this one line just now to do the task for me.

Continue reading

bash script to periodically change the cursor theme.

2010-05-07 1 min read Fedora GNOME

#!/bin/bash
[[ ”$1” == ”” ]] && time=5 || time=$1
[[ ”$2” == ”” ]] && (
cd ~/.icons
cont=”y”
echo ”Select one of the icon themes”
echo ”When you like some theme just press Ctrl+c”
for i in *
do
[[ -d $i/cursors ]] && (
echo ”Now trying …. : $i”
gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme ”$i”
sleep $time
)
done
) || gconftool-2 –type string -s  /desktop/gnome/peripherals/mouse/cursor_theme ”$2”

Continue reading

Post your free classifieds.

2010-05-07 1 min read Linux

I have put up a free classifieds site here:

<a href="http://noah.amit-agarwal.co.in/" target="_blank">http://noah.amit-agarwal.co.in/

top - looks better and is more useful with a rc file...

2010-05-07 1 min read Fedora Learning Linux

top is a very useful command to find out who is eating up the <a class="zem_slink freebase/en/central_processing_unit" title="Central processing unit" rel="wikipedia" href="http://en.wikipedia.org/wiki/Central_processing_unit">CPU or the memory. But sometimes the plain and simple look simply would be boring so how about some fun. Copy the below code to file : ~/.toprc

RCfile for &#8221;top&#8221;
Id:a, Mode_altscr=1, Mode_irixps=0, Delay_time=5.000, Curwin=0
Def    fieldscur=mfcAbdEgHIursOpQTvyzWjKNLX
winflags=32184, sortindx=10, maxtasks=0
summclr=4, msgsclr=5, headclr=5, taskclr=4
Job    fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX
winflags=62777, sortindx=0, maxtasks=0
summclr=6, msgsclr=6, headclr=7, taskclr=6
Mem    fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX
winflags=62777, sortindx=13, maxtasks=0
summclr=5, msgsclr=5, headclr=4, taskclr=5
Usr    fieldscur=ABDECGfhijlopqrstuvyzMKNWX
winflags=62777, sortindx=4, maxtasks=0
summclr=3, msgsclr=3, headclr=2, taskclr=3

Continue reading

Prachi collage

2010-05-06 0 min read Linux
\"\"

<span style="font-size: 0.9em; margin-top: 0px;">
<a href="http://www.flickr.com/photos/raj77_in/3946748772/">Prachi

Originally uploaded by <a href="http://www.flickr.com/people/raj77_in/">raj77_in

Later in the week or early next week I will be posting how I created the collage.
<br clear="all" />

Older posts Newer posts