|
Check last line with gawk?
I am writing a gawk script that checks some basic code conformance rules (java text files) using gawk. So far, so good.
But I have a requirement to ensure that the last line in the java source files is "/* eof */". The below snippet works BUT is called more than once per file as / / matches a "few" too many expressions. So how do I perform this check only once???
...
/ /{
if ( tail -1 FILENAME ~ "/* eof */" ) {
print "Yeah"
}
}
...
Go easy, I'm a newbie.
|