Database Reference
In-Depth Information
-b, --number-nonblank
number nonempty output lines, overrides -n
-e equivalent to -vE
Sometimes you'll see us use
head
,
fold
, or
cut
at the end of a com‐
mand. This is only to ensure that the output of the command fits
on the page; you don't have to type these. For example,
head -n 5
only prints the first five lines,
fold
wraps long lines to 80 charac‐
ters, and
cut -c1-80
trims lines that are longer than 80 characters.
Not every command-line tool has a man page. For shell builtins, such as
cd
, you need
to use the
help
command-line tool:
$
help cd
| head -n 20
cd: cd [-L|[-P [-e]] [-@]] [dir]
Change the shell working directory.
Change the current directory to DIR. The default DIR is the value of the
HOME shell variable.
The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with a slash (/), then CDPATH is not used.
If the directory is not found, and the shell option 'cdable_vars' is set,
the word is assumed to be a variable name. If that variable has a value,
its value is used for DIR.
Options:
-L force symbolic links to be followed: resolve symbolic links in
DIR after processing instances of '..'
-P use the physical directory structure without following symbolic
links: resolve symbolic links in DIR before processing instances
help
also covers other topics of Bash, in case you are interested (try
help
without
command-line arguments for a list of topics).
Newer tools that can be used from the command line often lack a man page as well.
In that case, your best bet is to invoke the tool with the
-h
or
--help
option. For
example:
jq --help
jq - commandline JSON processor [version 1.4]
Usage: jq [options] <jq filter> [file...]
For a description of the command line options and