Ever found yourself switching between vim and using cat <filename> because vim has syntax highlighting but you want to stay at the prompt?
You can replace the /bin/cat command with a the ‘cat’ command. If you cat a file, it will output its text using the appropriate syntax highlighting by default and will also include line numbers.
In debian, you can install using:
sudo apt install bat-cat
In Alma and Red-hat based systems, just use:
dnf install bat
Here is some sample output of using cat on a file called testphp.php:
More discussion can be found here:
Recent Comments