The error message appears to be AIX in origin ... and I'm not able to reproduce your problem on AIX 5.3.
In this case, there's no need to use both awk and grep, one or the other will do.
The long and short of it is that since grep doesn't directly support ranges, you could condense the above to achieve (what I believe to be) the same result using awk as follows: