Hi, I tested this with latest grep 3.0 in linux RHEL and some Ubuntu servers as well.
To reproduce run in empty directory echo "start_string_20091210.end" | grep -o [1-2][0][0-1][0-9][0-1][0-9][0-3][0-9] mkdir 20011209 echo "start_string_20091210.end" | grep -o [1-2][0][0-1][0-9][0-1][0-9][0-3][0-9] rmdir 20011209 echo "start_string_20091210.end" | grep -o [1-2][0][0-1][0-9][0-1][0-9][0-3][0-9] the results is 20091210 20091210 grep return is empty when directory, 20011209, is present and is as expected when directory removed. Thanks for reading, Ildar