Unix Display N Lines Before Search

Utility to search a String in a file Unix. Print Lines before the String found. Using grep command of unix. Please enter fields below and press submit button.

Input:
String to search:
Filename:
Number of lines to print before:
Result:
Command to find a pattern in a file: