Help to unzip more than one *.zip files
Hi,
I need to unzip more than one abc_*.zip files. one file is abc_ooo_<datetime>_<number>.zip and other file is abc_ddd_<datetime>_<number>.zip I tried this in the script file_name=abc_*.zip for -f $file_name{ unzip -o $file_name } But the files are not unzipped.I get this "caution: filename not matched:abc_ooo_<datetime>_<number>.zip" When i try to unzip single file,unzip works. Please help to do this. Thanks, Sana |
Updated-
sorry..the for loop I tried is as below:
file_name=abc_*.zip for f in $file_name{ unzip -o $file_name } Thanks, Sana |
I'd try to use double quotes to embed the filename. This should take care of spaces in filenames (if any). Also, the error is that you don't use the loop variable in the unzip command, but the whole file list. So try this:
Code:
for f in abc_*.zip |
Do you really need a script? unzip can take more than one file name as options.
|
Quote:
Code:
caution: filename not matched:abc_ooo_<datetime>_<number>.zip |
Thanks a lot.I was able to unzip the files.
|
All times are GMT -5. The time now is 09:33 AM. |