I wonder how portable posix character classes are in egrep... Not to mention head -n. Maybe both are portable enough, since we're not compiling on any all-that-old architectures, but still, perhaps: spacetab=' ' XDVI_VERSION_INFO=`egrep "^[$spacetab]+\*" $srcdir/CHANGES | sed 1q | awk '{print $2 " " $3}'`