Files
tldr/pages.zh/common/bat.md
2020-11-04 17:12:56 -03:00

30 lines
556 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# bat
> 可以打印并且合并文件的命令.
> `cat`的复制品外加无法高亮和git集成.
> 更多信息: <https://github.com/sharkdp/bat>.
- 文件内容打印:
`bat {{文件}}`
- 多文件合并到目标文件:
`bat {{文件1}} {{文件2}} > {{目标文件}}`
- 在指定文件后追加多个文件合并的内容:
`bat {{文件1}} {{文件2}} >> {{目标文件}}`
- 打印时,显示行号:
`bat -n {{文件}}`
- 高亮一个json文件:
`bat --language json {{文件.json}}`
- 受支持的语言清单:
`bat --list-languages`