Читать книгу Linux Bible - Christopher Negus - Страница 205
NOTE
ОглавлениеAlthough most elements of shell scripts are relatively freeform (where white space, such as spaces or tabs, is insignificant), both let
and expr
are particular about spacing. The let
command insists on no spaces between each operand and the mathematical operator, whereas the syntax of the expr
command requires white space between each operand and its operator. In contrast to those, bc
isn't picky about spaces, but it can be trickier to use because it does floating-point arithmetic.
To see a complete list of the kinds of arithmetic that you can perform using the let
command, type help let at the bash prompt.