Hi everybody...
I'm completely new to the forums and extremely new to scripting. I've been through a few tutorials to get started on learning the perl language. I'm decent with linux CLI and I'm looking for ways to make life easier with some of the things I'll be doing.
I wanted to create a script that allows for multiple grep 'string' searches and then outputs the results to a file named 'grep'd string'.
Here's the scenario:
-One directory with multiple flat files which contain many rows of events which are delimited by |
-I want separate files created for each string I'm interested in and each file can be named after the string I specify through grep
-So I'll create a text file, I suppose, to contain all the strings I want to grep, where the script would point to that file as a reference for each grep command
-after every grep, a file should be created
-I want to run this weekly, as new files are added to the directory
-Upon running it weekly, I want the new info to be appended to it's respective file, but without creating duplicates from grep'ing the older files.
I think that pretty much sums it up. Please let me know if I can explain this better, or simply, more info is needed.
-David
I'm completely new to the forums and extremely new to scripting. I've been through a few tutorials to get started on learning the perl language. I'm decent with linux CLI and I'm looking for ways to make life easier with some of the things I'll be doing.
I wanted to create a script that allows for multiple grep 'string' searches and then outputs the results to a file named 'grep'd string'.
Here's the scenario:
-One directory with multiple flat files which contain many rows of events which are delimited by |
-I want separate files created for each string I'm interested in and each file can be named after the string I specify through grep
-So I'll create a text file, I suppose, to contain all the strings I want to grep, where the script would point to that file as a reference for each grep command
-after every grep, a file should be created
-I want to run this weekly, as new files are added to the directory
-Upon running it weekly, I want the new info to be appended to it's respective file, but without creating duplicates from grep'ing the older files.
I think that pretty much sums it up. Please let me know if I can explain this better, or simply, more info is needed.
-David