aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/math.txt
diff options
context:
space:
mode:
authorGravatar David Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au>2013-05-12 15:56:01 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-05-13 01:48:20 -0700
commit1287b9d82382bf22e16edda67eae755f07397f2e (patch)
tree811814b029d65ac11a193e616ca4a71d216dbe0c /doc_src/math.txt
parent91aab03b90a6b583a3c0ecff5b015c6066d34f28 (diff)
Help cleanup
Large list of changes, including formatting and typos for most commands. More substantive changes have been made to alias, bind, block, break, builtin, case, cd, commandline, count, else, emit, fish_config, funced, function, functions, history, math, mimedb, nextd, not, popd, prevd, pushd, pwd, random, read, set, set_color, switch, test, trap, type, ulimit, umask, and while.
Diffstat (limited to 'doc_src/math.txt')
-rw-r--r--doc_src/math.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc_src/math.txt b/doc_src/math.txt
index 9455e0da..9904a2cc 100644
--- a/doc_src/math.txt
+++ b/doc_src/math.txt
@@ -6,10 +6,10 @@
\subsection math-description Description
-math is used to perform mathematical calculations. It is only a very
-thin wrapper for the bc program, that makes it possible to specify an
+\c math is used to perform mathematical calculations. It is a very
+thin wrapper for the bc program, which makes it possible to specify an
expression from the command line without using non-standard extensions
-or a pipeline. Simply use a command like <code>math 1+1</code>.
+or a pipeline.
For a description of the syntax supported by math, see the manual for
the bc program. Keep in mind that parameter expansion takes place on
@@ -18,3 +18,9 @@ order to perform calculations involving environment variables or the
output of command substitutions, but it also means that parenthesis
have to be escaped.
+\subsection math-example Examples
+
+<code>math 1+1</code> outputs 2.
+
+<code>math $status-128</code> outputs the numerical exit status of the
+last command minus 128.