Linux uses powerful regular expressions in many of its tools...
Just do a
grep '^1$' filename
The pattern ^1$ is regular expression.
^ means beginning of line
1 is a character to match
$ means end of a line.
A quickstart to Regexp http://www.regular-expressions.info/quickstart.html
Learn regular expressions for powerful searching etc...