The grep command searches the given input files for lines containing a match to the given PATTERN. By default, grep prints the matching lines. It has no limits on input line length other than available memory, and it can match arbitrary characters within a line.
The general syntax is as follows:
grep Options Search-Pattern InputFileNames
In this example, you are printing the version number of grep command:
GNU grep 2.5.4 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.