I think I wasnt clear in my explanation
I have 20 files and a list of ten words; such as [the of and ...]
each of my files are strings of 6 words starting with one of the words mentioned above
the goal is to extract substings that start with one of those words and finishes with a other --> then drop everything out of the string out and save in a separate file or colums
that would mean for each file I would have 100 patterns of substrings to be extracted
so if we have following lines
1 the book is black... |
2 the dog and its owner... |
3 the box of tissues... |
4 of the edge ... |
so the output should look like this
1 | this line should be ignored |
2 | this one has the pattern of “the.*and” so it can go on the column or file “the-and” |
3 | this line has the pattern of “the.*of” so it can go on the column or file “the-of” |
4 | this line has the pattern of “of.*the” so it can go on the column or file “of-the” |
so really don't know how I can deal with it
would not be suitable for 100 patterns ; specially when they need to be saved in different places and the
Quote:
GREP -F -f acceptfile.txt
would not work with the “x.*y” patterns