How do I open the man page for square brackets math and what are they called?

I have been working with them for a while now (math equations in $[], not the arrays)

arrConflicts[0]=$[arrConflicts[0]+1]
currentCombination=$[ (arrFiles[0]-1+arrFiles[0]-i)*i/2-arrFiles[0]+j ]
  1. How to call the man page?

  2. What is this math called (to google)?

  3. Does it have a min and max function?


Solution 1:

It's one way of doing arithmetic expansion in bash. It was deprecated years ago, and current GNU documentation doesn't mention it (Ubuntu's manpages still do, though: run man bash and see the section on Arithmetic Expansion). From this Stack Overflow post:

The manpage for bash v3.2.48 says:

[...] The format for arithmetic expansion is:

     $((expression))

The old format $[expression] is deprecated and will be removed in upcoming versions of bash.

You should use $((...)) instead.

No, it doesn't have min or max functions.