Hi!! Im new to shell scripting. I have an important assignment to complete in my company tomorrow. Please help me. I have to write an interactive script which does the following thing:
There is a file named ""rules"in a folder say /home/f1/ . This file contains text in the form:
123
345
456
678
...
I have to search for all the patterns in another folder say /home/f2 which contains various templates say temp1, temp2, temp3 etc. Each of this template has a content which looks like:
********
********
- rules 123
-rules 345
^^^^
^^
etc.
All the contents of rules may or may not be included in the temp files.
I have to find what all templates contain which files
for eg: rule 123: temp1, temp3, temp4
rule 345: temp2, temp5
The file rules has around 300 rules and the number of templates is around 100.