17 lines
317 B
Bash
Raw Normal View History

2023-08-31 18:39:58 +02:00
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"
}
2023-09-05 13:37:37 +02:00
cless(){
ccat $* | less -r
}
2023-08-30 11:30:13 +02:00
ctail(){
2023-09-05 13:37:37 +02:00
tail $* | ccat
2023-08-30 11:30:13 +02:00
}
cgrep(){
2023-09-05 13:37:37 +02:00
grep $* | ccat
2023-08-30 11:30:13 +02:00
}
2023-08-31 18:31:45 +02:00