http://kor.i2p/books/The%20C%20Programming%20Language%20by%20K&R/chapter5.html
As a second example, let us make some enhancements to the pattern-finding
program from Section 4.1 . If you recall, we
wired the search pattern deep into the program, an obviously unsatisfactory
arrangement. Following the lead of the UNIX program grep , let us
enhance the program so the pattern to be matched is specified by the first
argument on the command line.