Feed on
Posts
Comments

Category Archive for 'Scripts'

Laptop/PC and external LCD/VGA screen

OS : Ubuntu Intrepid – Gnome. In case you like to see a lot of movies you probably need to use from time to time the Screen Resolution utility from System->Preference in Ubuntu Intrepid to activate the second Tv screen. This utility seems to work in an unstable manner but from the reviews I read [...]

Read Full Post »

Not once now, I was in the situation of having to search for a text in a file and replace it with another. Sed and Awk work but for multi lines there is a bit of coding to do in order to work. The big problems is the new line “\n”. So, the natural solution [...]

Read Full Post »

Unpack any archive, quick and easy

Every time I try to unpack a zip,gzip,tgz or rar I always have to remember and search the right syntax. But that’s a problem no more because of a simple and easy to use script. #!/bin/bashextract(){ SAVEIFS=$IFS IFS=$(echo -en “\n\b”) if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;; [...]

Read Full Post »

Xargs Command

An interesting command to find a text in any file in a directory ls /etc/init.d/* | xargs cat | grep Let’s say you are interested in finding out in what init file is located. What you can do it use xargs. First you list all the files in the directory. Then you pass that info [...]

Read Full Post »

This tutorial will teach you how to use ndiswrapper in case you want to make your wireless card work. First of all you should open a terminal and try this commands : rmmod b43rmmod b44rmmod ssbrmmod ndiswrappermodprobe ndiswrappermodprobe b44 Rmmod will remove all the modules and modprobe will enable ndiswrapper.The big problem was the fact [...]

Read Full Post »

9 secrets for Shell enthusiasts

1. CUT “Print selected parts of lines from each FILE to standard output.” USAGE : cut -d: -f1 /file Params explained : * -d: will set de default delimiter to “:” * -f1 will print the column number 1 2.FIND “Search for files in a directory” USAGE : find / -name ‘*.txt’ -type f -print [...]

Read Full Post »

Ubuntu shutdown shortcut

If you are looking for a quick way to close your computer then you’re in luck. First let’s fire up the command : sudo visudo The default ubuntu text editor will pop-up and you can start editing this text file located into /etc/sudoers. Second lets add this command : Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown just under [...]

Read Full Post »

Bash script to start/stop a service

If you like the syntax /etc/init.d/network start/stop then you might want to write some scripts of your own to do a similar job. Using sudo vi /etc/init.d/msgbox you can create a file in you /etc folder. #!/bin/bashif [[ $1 == start ]] ; thenkdialog –msgbox “command1″elsekdialog –msgbox “command2″fi This script will create a dialog box [...]

Read Full Post »

Hardware Information about your system

I always find it dificult to find out information about my hardware configuration even on Windows XS. There are a lot of good GUI specifically designed for this purpose but when I’m looking for something I look for a particular item. Opening a big list with all the component is my system and searching for [...]

Read Full Post »

Use bash to create a changing desktop

If you are interested in a changing wallpaper you can use some simple commands to do this task. DATE=`date +’%Y-%m-%d’`wget “http://www.x-rates.com/d/USD/EUR/graph120.png” -O “/home/user/euro.jpg”gconftool -t string -s /desktop/gnome/background/picture_filename “/home/user/euro.jpg” The first variable DATE is just for your future uses.Wget – is a well known command that is used to download the file we gone use as [...]

Read Full Post »

Older Posts »