Computing.Net > Forums > Unix > help with a modified grep script

help with a modified grep script

Reply to Message Icon

Original Message
Name: slick
Date: February 10, 2003 at 11:33:32 Pacific
Subject: help with a modified grep script
OS: MKS Korn Shell
CPU/Ram: --
Comment:

I am trying to write a shell script that prompts for the amount of strings you want to search for and asks you the strings to look for. After some kind of determination as to when you are done inputting strings it lists the name of only those files where all the strings are located. It also should display, for each string in the file, the line that the string is on and one line following that.

If anyone can help me out with this i would greatly appreciate it, and no it is not for an assignment, just a a helpful personal tool. currently it asks for how many strings (limit of 5) and then searches and displays only the file name and the line the string is on. It would also be nice not to have a resriction in the number of strings i can search for.

Thank you for any help or a script that could be provided.


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: help with a modified grep script

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge