This is a discussion on shell script to search specific file from txt file inside zip file and extract it within the Shell scripting forums, part of the Development/Scripting category; Hi Guys, I wanted to search and extract specific file mentioned in .txt file from .zip in a file system. ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Hi Guys,
I wanted to search and extract specific file mentioned in .txt file from .zip in a file system. Eg; test.zip is a file and inside that there are file 1.img 2.img 3.img 4.img and 5.img and I have a plain text file in that I had mentioned only 1 in 1st line and 5 on 2nd line; Now I wanted to search this matching pattern 1 and 5 and check in all *.zip file in file system and extract the one which matches. Thanks in Advance. |
| Sponsored Links | ||
|
|
|
||||
|
No need to write a script.
Code:
unzip test.zip "*.img"
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
Hey Rocky Jr.
Thnx for your reply but my problem is tht I want to read the file name which needs to be extracted from a plain text file. Like using for loop |
![]() |
| Bookmarks |
| Tags |
| unzip file , wildcard unzip |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell Script Searching For a Record In The File | vinz4ever | Shell scripting | 1 | 05-11-2008 07:35 PM |
| word search in file | chandanperl | Coding in General | 2 | 03-11-2008 10:16 AM |
| shell script for ftp the file | vishal_titre | Shell scripting | 3 | 12-10-2007 08:40 AM |
| error shell script no such file or directory /bin/sh | Linux software | 1 | 01-08-2006 08:34 PM | |
| Script to extract a specific row of data | ricc | Shell scripting | 1 | 11-15-2005 02:29 PM |