Below is the tail statement:
tail -4 FDECMP1_$$.log
I need to print the last 4 lines of file FDECMP1_$$.log
in Red.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThis command will do the job:
printf "%s" $(printf '\033[0;31m');tail -4 FDECMP1_$$.log
As @galoget showed, you can use the ANSI escape sequences to change the coloring of shell texts.
This answer has more information on this and a nice xterm-256-color-chart to conveniently find the correct color for your purposes.