Variable definition

Hi all,

I'm bit new to the advanced bash shell scripting.

When I'm looking at some of the existing code in my organization, got confused with a few variable definings.

For ex:

var1={1:-30}
var2="abc def ghi"
var3={xyz:-$var2}

In above, 1st and last lines are confusing me. Could anyone explain the meaning of it and how we can use those variable values please?

It would be very helpful if anyone suggest a brief guide or doc about advanced bash shell scripting.

Thnaks in advance.

This may be of use:
http://tldp.org/LDP/abs/html/parameter-substitution.html

See here

Example shows how it works :

A=30
B=40
echo ${A:-B} 
30
A=""
echo ${A:-B}
B
echo {A:-$B}
{A:-40}

Thank you so much to both...

Those urls are having valuable info for me...

Thanks again for the explanation...

This may help define a variable, in computer programming:) I have read that it is a storage location and an associated symbolic name, an identifier which contains some known or unknown quantity or information, a value.