This script can be usefull if you usually have more than one android device connected to your PC - it saves you from having to type the serial number of the device you want to use - it will ask the user on which device he wants to use "adb" command if there are multiple devices connected to the PC.
Installation: just copy the script wherever you like to keep your scripts (I use ~/bin for that) as long as it's in $PATH and make sure it's executable. Also, an alias in ~/.bashrc might be usefull ;)