HardenedBSD/usr.bin/lex/version.awk
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00

11 lines
119 B
Awk

BEGIN {
FS = "[ \t\.\"]+"
}
{
if ($1 ~ /^#define$/ && $2 ~ /^VERSION$/) {
printf("%s.%s.%s\n", $3, $4, $5);
}
}