Name: Anonymous 2009-08-28 4:05
Hi /prog/. I'd like to give you this humble sed script that you might appreciate if you are a programmer and you'd like to find out quickly errors and warnings from gcc stderr
In order to use it, just redirect gcc's stderr into it, like:
or
#!/bin/sed -rf
s/^([^ :]+):([0-9]+)/\x1b[36m\1\x1b[0m:\x1b[36m\2\x1b[0m:/g
s/([wW][aA][rR][nN][iI][nN][gG])/\x1b[32m\1\x1b[0m/g
s/([eE][rR][rR][oO][rR])/\x1b[31m\1\x1b[0m/gIn order to use it, just redirect gcc's stderr into it, like:
gcc -c mystuff.c 2>&1 | ./the_sed_scriptor
make 2>&1 | ./the_sed_script