//echo 3 -a $min(70,500,60) $min(70,500,60).text | echo 4 -a $min(70,500,60) foo $min(70,500,60).text | echo 3 -a $min(70,500,60) $max(70,500,60).text | echo 4 -a $max(70,500,60) foo $min(70,500,60).text | var -s %a $min(700,500,60) $min(700,500,60)
result:
$min(70,500,60).text 60
foo foo 60
$max(70,500,60).text 500
500 foo 60
* Set %a to $min(700,500,60) 60
The only combo here that didn't return wrong results is when $max preceded $min
edit: looks like it's just $min is somehow evaluating the rest of the command line
//echo 3 -a $version $min(1,2,3) $version
result:
7.63 $version 7.63
edit again: The problem with evaluating outside the parenthesis also exists with $max, it's just that text was evaluating as zero, so wasn't showing in the 1st example.
//echo 3 -a $max(-1,-2,-3) foo $min(70,500,60)
result:
foo foo 60