Hello Users,
I am new to unix. I have a requirement to extract the string in the folder with files names XXXX.sev.xxxxx.lookup (There are some more files which I am not interested in like xxxxx.include.xxx.lookup).
1) I am looking for the file with the name "sev" ending with "lookup"
For example there will be a file with juniper-MIB.sev.snmptrap.lookup
2) In that file I want to extract a string starting with "SNMP". For example the above file would contain the following information
{"SNMPTRAP-juniper-MPLS-MIB-mplsLspUp","1","2","0"},
{"SNMPTRAP-juniper-MPLS-MIB-mplsLspDown","3","1","0"},
{"SNMPTRAP-juniper-MPLS-MIB-mplsLspChange","2","13","1800"},
The output should be SNMPTRAP-juniper-MPLS-MIB-mplsLspUp . There should not { " etc.
3) The output should be sent to a file.
Can some please help me how I can achieve using shell script.
Your help is highly appreciated.
Thanks.
Regards,
RaviShankar.