So far I have been able to use the awk commands with good results however, I have noticed that as my set of files grows, it takes longer to get the output files. In time I may have memory issues. I'm thinking one way to cut down on the time and memory used would be to search only those set2...
Hi feherke
I have tested your code but it doesn't seem to be working it prints out a blank file for set2_out.txt. I can't figure out what is wrong.
Also is it possible to use the dates on the file names only instead of using the date in the file contents from set1?
thanks
Sorry about that. There was a typo on file names of the second file in set1 and set 2. both file names have been set1_2009-05-21.txt and set2_2009-05-21.txt respectively not setX_2009-05-14.txt as shown so the date in the contents is related to the file name. Simply put I'm trying to match the...
Sorry about that. There was a typo on file names of the second file in set1 and set 2. both file names have been set1_2009-05-21.txt and set2_2009-05-21.txt respectively not setX_2009-05-14.txt as shown so the date in the contents is related to the file name. Simply put I'm trying to match the...
I have two related sets of files that I need to search. Please note that the dashes are not part of the file they just separate the file names
from the contents
Set 1 has the following fields date, record number, name
set1_2009-05-20.txt << file name
-------------------
2009-05-20~1~Name1...
Hi I'm an awk newbie and I need help with a problem.
I have some files in which I need to match a certain pattern, skip two lines and then replace the current line (after skipping) with something e.g.
...
line a ("tom") <-- tom is the pattern to be found
line b blah blah <-- to be skipped
line...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.