Was wondering if someone can take the time to explain the following:I have a directory of files (PDF), which I place into an array.shopt -s nullglob                                   # Set array to 0 is nothing found=declare -a TotalFiles=($Prefix*.pdf)                # Current listing of filesTotalFileCount=${#TotalFiles[@]}In my mesting the array contains the following.Array Contents Scan-0030.pdf Scan-0140.pdf Scan-0005.pdf Scan-0006.pdf Scan-0007.pdf Scan-0008.pdf Scan-0009.pdf Scan-0010.pdfI have created a the following functions to derive the next file to createfunction NextNum {    HighestNum =0    echo NextNumber Functions    #for index in ${TotalFiles[*]}    for file in ${!TotalFiles[*]}    do        #printf %4d: %s\n $index $TotalFiles ${array[$index]}        echo $file ${TotalFiles[$file]}        name=${TotalFiles[$file]}        name=${name//[^0-9]/}        name=$((10#$name))        echo File number in  name  - $name        echo $file        TotalFiles[$file]=$name        **((name > HighestNum)) && HighestNum=$name**    done}My question is with this line in the function which i found by googleling.((name > HighestNum)) && HighestNum=$nameHow come one does not have to specify that two variables are being compared? like this,(($name > $HighestNum)) &&  HighestNum=$namethank you for the assistance.
Comparing variables in arithmetic
bash;shell;variable;arithmetic
The reason is that ((...)) is a special case.  It performs arithmetic.  There is no use for text inside ((...)).  Thus, as a short-cut, any name inside ((...)) is assumed to refer to a shell variable.As a result, the following two do the same thing:$ a=1; b=2; ((c=$a+$b)); echo $c3$ a=1; b=2; ((c=a+b)); echo $c3