17 lines
317 B
Bash
17 lines
317 B
Bash
ccat(){
|
|
cat $* | sed -u "s/ERROR/$(tput setaf 1)&$(tput sgr0)/gI"|sed -u "s/WARNING/$(tput setaf 3)&$(tput sgr0)/gI"|sed -u "s/INFO/$(tput setaf 2)&$(tput sgr0)/gI"|sed -u "s/DEBUG/$(tput setaf 6)&$(tput sgr0)/gI"
|
|
}
|
|
|
|
cless(){
|
|
ccat $* | less -r
|
|
}
|
|
|
|
ctail(){
|
|
tail $* | ccat
|
|
}
|
|
|
|
cgrep(){
|
|
grep $* | ccat
|
|
}
|
|
|