Chapter 6. Expressions

An expression is a formula that calculates a value. Bash has several built-in commands and functions to compute expressions, and not all have the same syntax or features. In some cases there is more than one way to calculate the same expression. There are also many specialized features for use in rare cases. As a result, few Bash programmers have all the nuances memorized.

During one of my many conversations with the late professor and author F. Ray Skilton, we were discussing the use of pull-down menus as a tool not for making selections but as a memory aid for commands. He turned away from his Atari computer and asked me, “Have you learned enough computer languages to start forgetting the syntax of commands you haven't ...

Get Linux Shell Scripting with Bash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.