bat
Print and concatenate files. A `cat` clone with syntax highlighting and Git integration.
More info →Options (5)
-H, --highlight-linebooleanHighlight a specific line or a range of lines with a different background color
bat {{[-H|--highlight-line]}} {{10|5:10|:10|10:|10:+5}} {{path/to/file}}-A, --show-allbooleanShow non-printable characters like space, tab, or newline
bat {{[-A|--show-all]}} {{path/to/file}}-n, --numberbooleanRemove all decorations except line numbers in the output
bat {{[-n|--number]}} {{path/to/file}}-l, --languagebooleanSyntax highlight a JSON file by explicitly setting the language
bat {{[-l|--language]}} json {{path/to/file.json}}-L, --list-languagesbooleanDisplay all supported languages
bat {{[-L|--list-languages]}}Examples (8)
Pretty print the contents of one or more files to `stdout`
bat path/to/file1 path/to/file2 ...Concatenate several files into the target file
bat path/to/file1 path/to/file2 ... > path/to/target_fileRemove decorations and disable paging (`--style plain` can be replaced with `-p`, or both options with `-pp`)
bat --style plain --pager never path/to/fileHighlight a specific line or a range of lines with a different background color
bat [-H|--highlight-line] 10|5:10|:10|10:|10:+5 path/to/fileShow non-printable characters like space, tab, or newline
bat [-A|--show-all] path/to/fileRemove all decorations except line numbers in the output
bat [-n|--number] path/to/fileSyntax highlight a JSON file by explicitly setting the language
bat [-l|--language] json path/to/file.jsonDisplay all supported languages
bat [-L|--list-languages]