LinuxCommandLibrary

arithmetic

Perform arithmetic calculations

TLDR

Start an arithmetic quiz

$ arithmetic
copy

Specify one or more arithmetic [o]peration symbols to get problems on them
$ arithmetic -o [+|-|x|/]
copy

Specify a [r]ange. Addition and multiplication problems would feature numbers between 0 and range, inclusive. Subtraction and division problems would have required result and number to be operated on, between 0 and range
$ arithmetic -r [7]
copy

SYNOPSIS

arithmetic [EXPRESSION] – not a standard command

DESCRIPTION

The arithmetic command is not present in standard Linux distributions or common Unix toolsets like coreutils, busybox, or util-linux. Searches across major repositories (Ubuntu, Fedora, Debian, Arch) and man pages yield no results for a standalone executable named arithmetic.

It may refer to shell builtins like bash's $(( )) arithmetic expansion, or scripts in custom environments. For command-line arithmetic, standard tools include:
expr: Basic integer ops, e.g., expr 10 / 2
bc: Arbitrary precision, e.g., echo 'scale=2; 10 / 3' | bc
dc: RPN calculator.
• Shell: echo $((10 * 2 + 5))

No official documentation exists. If this is from a specific package or custom build, provide more context for analysis.

CAVEATS

Does not exist in standard Linux; may cause 'command not found' error. Use alternatives to avoid issues.

QUICK ALTERNATIVES

Bash: echo $[10 + 5] or let x=10+5; echo $x
Python: python3 -c "print(10 + 5)"

HISTORY

No recorded development or inclusion in POSIX, GNU, or BSD standards.

SEE ALSO

expr(1), bc(1), dc(1), awk(1)

Copied to clipboard