Shell scripting is part of my day today life job. Sometime you just need to cut or grab first few characters of a string. For example, consider following string I am using in a script:
I just need to grab network id i.e. 192.168.1 of a string $IP
I can write out
$ echo $test
It took me more than an hour to find out solution to this tiny problem. BASH man page Parameter Expansion has lots of information. Make sure you read it.