#!/bin/bash echo "This text is colored red." | grep --color=always "This text is colored red."; #displays text in red mkdir "longfilethatiwillneveruse"; cd "longfilethatiwillneveruse"; mkdir "This text is colored blue."; ls -G; #displays text in blue rmdir "This text is colored blue."; cd ..; rmdir "longfilethatiwillneveruse";
Kind of useless by itself, but if I want to display a message in a shell script, color coding it makes it a hell of a lot easier to read.


Sign In
Create Account


Back to top









