Hi friends
I have a zip file 1.zip which contains three text files a.txt b.txt c.txt
I want to grep some text(keyword) in those 3 files without extracting all the three files to a local directoryusing the command,
unzip -p 1.zip |grep "search text" >result.txt
The Output file is looking like this:
Search text from a.txt
Search text from b.txt
Search text from c.txt
But i need the following output:
a.txt: Search text from a.txt
b.txt: Search text from b.txt
c.txt: Search text from c.txt
I mean I need the file identity in each matching text string from each file.
I hope all of you understood the problem statement.
Please send me the modified command.Regards
Sidda