There need to be single quotes around the string with escaped periods: `grep '1\.2\.7'`.