
07-08-2009, 04:00 PM
|
| Junior Member | | Join Date: Jul 2009
Posts: 1
| |
Re: tail with color? For bash I was not able to use the parameters for an alias. Therefor I created a function:
t() {
tail -f -n5000 $1 | perl -pe "s/$2/\e[1;31;43m$&\e[0m/g"
}
This function will tail the file given as parameter 1 and highlight the text given as parameter 2.
Example:
t myLog.log INFO
Martijn de Bruijn |