#!/usr/bin/awk -f # Script by Ypnose - http://ywstd.fr BEGIN { FS="\n" } symb = substr($0,1,1) { # Highlight end line space(s)/tab(s) if ($0 !~ /^ $/) gsub(/[\t ]+$/,"\033[0;41m \033[0m") if ($0 ~ /^Only in /) { printf("\033[1;34m%s\033[0m\n", $0) next } if (symb == "@") printf("\033[1;35m%s\033[0m\n", $0) else if (symb == "-") printf("\033[0;31m%s\033[0m\n", $0) else if (symb == "+") printf("\033[0;32m%s\033[0m\n", $0) else printf("%s\n", $0) }