its_me_gb
August 21st, 2006, 02:41 PM
ok, this is the first script i've written and is very simple :D
i got fed-up of having to open my browser to search for items on wikipedia, so i wrote this.
it uses zenity, so check its installed... or something.
paste into a text editor and save.
chmod +x /path/to/file
and you're sorted. i placed it in my ~/.gnome2/nautilus-scripts/ folder so that i could access it from the desktop.
it's simple but does what i want.
enjoy
#!/bin/bash
baseurl="http://en.wikipedia.org/wiki/Special:Search?search="
if foo=`zenity --entry --title="Search For..." --text="What are you searching for?"`
then fullurl=${baseurl}${foo}
firefox ${fullurl}
else
exit
fi
i got fed-up of having to open my browser to search for items on wikipedia, so i wrote this.
it uses zenity, so check its installed... or something.
paste into a text editor and save.
chmod +x /path/to/file
and you're sorted. i placed it in my ~/.gnome2/nautilus-scripts/ folder so that i could access it from the desktop.
it's simple but does what i want.
enjoy
#!/bin/bash
baseurl="http://en.wikipedia.org/wiki/Special:Search?search="
if foo=`zenity --entry --title="Search For..." --text="What are you searching for?"`
then fullurl=${baseurl}${foo}
firefox ${fullurl}
else
exit
fi