1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Cat Files With Color Using Bat as a unix til

This commit is contained in:
jbranchaud
2019-03-18 17:40:30 -05:00
parent 10b1ab273b
commit 7a0d60db38
2 changed files with 18 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
For a steady stream of TILs from a variety of rocketeers, checkout For a steady stream of TILs from a variety of rocketeers, checkout
[til.hashrocket.com](https://til.hashrocket.com/). [til.hashrocket.com](https://til.hashrocket.com/).
_787 TILs and counting..._ _788 TILs and counting..._
--- ---
@@ -686,6 +686,7 @@ _787 TILs and counting..._
- [All The Environment Variables](unix/all-the-environment-variables.md) - [All The Environment Variables](unix/all-the-environment-variables.md)
- [Cat A File With Line Numbers](unix/cat-a-file-with-line-numbers.md) - [Cat A File With Line Numbers](unix/cat-a-file-with-line-numbers.md)
- [Cat Files With Color Using Bat](unix/cat-files-with-color-using-bat.md)
- [Change Default Shell For A User](unix/change-default-shell-for-a-user.md) - [Change Default Shell For A User](unix/change-default-shell-for-a-user.md)
- [Change To That New Directory](unix/change-to-that-new-directory.md) - [Change To That New Directory](unix/change-to-that-new-directory.md)
- [Check If A Port Is In Use](unix/check-if-a-port-is-in-use.md) - [Check If A Port Is In Use](unix/check-if-a-port-is-in-use.md)

View File

@@ -0,0 +1,16 @@
# Cat Files With Color Using Bat
The time-tested utility `cat` is probably one of the most used unix
commands. It prints the contents of the file to stdout. You can use it to
get a quick view of a file.
![example of cat](https://i.imgur.com/kb1UjPW.png)
We live in a world of color and our terminal emulators are capable of so
much more. There is an alternative to `cat`, called `bat`, that provides
syntax highlighting based on the type of file.
![example of bat](https://i.imgur.com/ieL7v2Q.png)
This is an open-source utility written in Rust. You can check it out on
[github](https://github.com/sharkdp/bat).