Can anyone please tell me what is mean by :-
this symbol in Unix shell scripting
while [ ${runq:-$SLOTS} -ge $SLOTS ]
in the given example
Can anyone please tell me what is mean by :-
this symbol in Unix shell scripting
while [ ${runq:-$SLOTS} -ge $SLOTS ]
in the given example
This is a simple way to provide a default value using an expansion. See http://wiki.bash-hackers.org/syntax/pe#use_a_default_value for more information.
There are also answers to similar questions on stackoverflow like Read a variable in bash with a default value