Declare an integer variable with the specified value

declare

  • Declare variables and give them attributes.
    More information: <https://www.gnu.org/software/bash/manual/bash.html#Bash-Builtins>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

declare -i {{variable}}="{{value}}"

click the source code to copy