I think the OP was asking a different question than has been answered.
The way I read it was:
If a field in an input record, consisting of two groups of numbers (e.g. 1111122222), has less than ten digits in the second numerical group then print the line. Thus 111111111111111333333 is ok, but 11111333333333333 is not. Though one is acceptable, neither of the lines containing these would be printed by the above examples because both fields contain more than ten digits total.
As there is no other description, I've assumed that there are only two different digits that might appear in the last 10 digits of the field. Something like this is needed to determine whether or not the line should be printed:
# assumes first field; change $1 to $n for a different field
awk '
{
ln = length( $1 );
if( ln < 10 ) # assumes field contains digits; may want to check
{
print;
next;
}
# if the last digit in the field matches the last-10th digit,
# then the last numerical set is > 10; print if they dont match
if( substr( $1, ln, 1) != substr( $1, ln-10, 1) )
print;
}' input-file
## justdoit ##
#!/bin/bash
while read -r l
do
x=$(echo "$l" | grep -o `echo "$l" | sed 's/.*\(.\)$/\1/'`|wc -l)
if [ $x -lt 10 ] ; then
echo "$l"
fi
done <infile