Concatenate files and print to standard output
cat -A {show-all} -b {number-nonblank} -e {flag-e} -E {show-ends} -n {number} ๐ show-all ๐ number-nonblank ๐ flag-e ๐ show-ends ๐ number cat -A {show-all} -b {number-nonblank} -e {flag-e} -E {show-ends} -n {number} Sandbox: execFile · Timeout: 30s
system.file.cat system.file.search system.file.process system.file.copy system.file.move system.file.delete | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
show-all | string | No | - | equivalent to -vET | -A, --show-all |
number-nonblank | string | No | - | number nonempty output lines, overrides -n | -b, --number-nonblank |
flag-e | string | No | - | equivalent to -vE | -e |
show-ends | string | No | - | display $ or ^M$ at end of each line | -E, --show-ends |
number | string | No | - | number all output lines | -n, --number |
squeeze-blank | string | No | - | suppress repeated empty output lines | -s, --squeeze-blank |
flag-t | string | No | - | equivalent to -vT | -t |
show-tabs | string | No | - | display TAB characters as ^I | -T, --show-tabs |
flag-u | string | No | - | (ignored) | -u |
show-nonprinting | string | No | - | use ^ and M- notation, except for LFD and TAB | -v, --show-nonprinting |
help | string | No | - | display this help and exit --version output version information and exit | --help |
version | boolean | No | - | --version |
Basic usage with show-all
cat ${show-all} Display help message
cat --help POSIX way in which to cat(1); see cat(1posix).
cat -u [FILE_1 [FILE_2] ...] Output a file, expanding any escape sequences (default). Using this short one-liner let's you view the boot log how it was show at boot-time.
cat /var/log/boot.log This is an ever-popular useless use of cat.
cat /etc/passwd | grep '^root' The sane way:
grep '^root' /etc/passwd If in bash(1), this is often (but not always) a useless use of cat(1).
Buffer=`cat /etc/passwd` The sane way:
Buffer=`< /etc/passwd` cat is a command-line utility for concatenate files and print to standard output.
cat -A {show-all} -b {number-nonblank} -e {flag-e} -E {show-ends} -n {number}