Hi all,
Would like to know how these substitution works??
FINISHED="Done"
x=126
COLS=$((${x} -${#FINISHED} - 5))
here does the #FINISHED give the ascii value of "done" ,or how does it work?
Thanks
Hi all,
Would like to know how these substitution works??
FINISHED="Done"
x=126
COLS=$((${x} -${#FINISHED} - 5))
here does the #FINISHED give the ascii value of "done" ,or how does it work?
Thanks
That's a standard bash/ksh variable expansion:
${#parameter}
The length in characters of the value of parameter is substi
tuted. If parameter is * or @, the value substituted is the
number of positional parameters. If parameter is an array name
subscripted by * or @, the value substituted is the number of
elements in the array.