bat Command Examples

Print and concatenate files. A cat clone with syntax highlighting and Git integration. More information: https://github.com/sharkdp/bat.

bat {{path/to/file1 path/to/file2 ...}}

bat {{path/to/file1 path/to/file2 ...}} > {{path/to/target_file}}

bat --style plain --pager never {{path/to/file}}

bat {{-H|--highlight-line}} {{10|5:10|:10|10:|10:+5}} {{path/to/file}}

bat {{-A|--show-all}} {{path/to/file}}

bat {{-n|--number}} {{path/to/file}}

bat {{-l|--language}} json {{path/to/file.json}}

bat {{-L|--list-languages}}