Problems writing bash script to unzip files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problems writing bash script to unzip files
# 1  
Old 09-18-2006
Problems writing bash script to unzip files

I'm getting the following errors when I try to write a script to unzip some zip files. When I use the free trial copy of the commerical winzip program, however, they work fine. When I use -l or -t on unzip it indicates no errors. When I use the -o switch interactively from the bash command line it works fine. These errors only occur from the bash script.

Can someone tell me what I am doing wrong (besides using windows)?
Siegfried

unzip OCAP1-EVAL-8300HD.zip .
Archive: OCAP1-EVAL-8300HD.zip
caution: filename not matched: .
unzip OCAP1-FS.zip .
Archive: OCAP1-FS.zip
caution: filename not matched: .
unzip OCAP1-QA.zip .
Archive: OCAP1-QA.zip
caution: filename not matched: .
unzip QA-3rdParty.zip .
Archive: QA-3rdParty.zip
caution: filename not matched: .
# 2  
Old 09-18-2006
Why do you have periods at the end of each zip line? It's tried to unzip '.' which is giving you the error.

Carl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to unzip files and Rename the Output-files

Hi all, I have a many folders with zipped files in them. The zipped files are txt files from different folders. The txt files have the same names. If i try to find . -type f -name "*.zip" -exec cp -R {} /myhome/ZIP \; it fails since the ZIP files from different folders have the same names and... (2 Replies)
Discussion started by: pmkenya
2 Replies

2. Shell Programming and Scripting

Question about writing a bash script

Hello, I want to write a bash script to delete the content after '#'. However, if '#' appears in a string with "", ignore this. For example, input file: test #delete "test #not delete" Output file: test "test #not delete" Does anyone know how to write this script? Thanks (1 Reply)
Discussion started by: jeffwang66
1 Replies

3. Shell Programming and Scripting

Using Shell Script in place of Perl script to Unzip the zip files.

Hi Expert, We have some shell scripts which Internally uses Perl Script to Unzip the source zip files which comes to inbound directory. So now our requirement is to avoid the dependency on Perl Script and us Shell Script to unzip the files. I have the Perl script with me attached can some one... (3 Replies)
Discussion started by: naveen.dasu
3 Replies

4. Shell Programming and Scripting

Writing a bash script using host

Im trying to write a script using the host command but its not working properly. I cant understand what Im doing wrong. When I use it at the command prompt, it works fine. But its being used actually in the script, it says its not found: 2 SERVFAIL. Can anyone help me? Here's what I have so far: no... (6 Replies)
Discussion started by: relsha
6 Replies

5. Shell Programming and Scripting

Writing Bash shell scripts corresponding to windows bat files

Experts, I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (15 Replies)
Discussion started by: rajuchacha007
15 Replies

6. Shell Programming and Scripting

Help with writing simple bash script

I want to write a bash script to: 1. Send an email from localhost to an external gmail account. (gmail then automatically forwards the message back to a pop account on the same server. 2. Script waits 3 minutes then checks to see if the email arrived, and if not, it sends an email to... (9 Replies)
Discussion started by: sallyanne
9 Replies

7. Shell Programming and Scripting

Unzip in bash script

My script works like this. 1. First for loop - checks if it can access zip parameters in a directory 2. If unzip fails for any of the file in that directory, then it goes inside the second for loop - to list which file is that 3. My doubt is..Is there any way I can tell status for every 5000... (17 Replies)
Discussion started by: vidhyamirra
17 Replies

8. Shell Programming and Scripting

unzip via bash startup script problems

i have two lines in my rc.local file that are wget -O/<path>/<file>.zip url://domain.com unzip -o /<path>/<file>.zip the wget works fine, but the unzip won't work. when i copy/pase the unzip line to the prompt it works fine. i thought that maybe the unzip was running before the wget... (0 Replies)
Discussion started by: easysnowboards
0 Replies

9. Shell Programming and Scripting

Script to unzip specific files

As part of an audit at work I need to review a lot of Windows workstations. One thing I need to do is review all of the .doc files. My problem is that I guessed a number of these files would be in zip archives. This is the case but they are mixed in with a lot of other file types that I am not... (1 Reply)
Discussion started by: stumpyuk
1 Replies

10. Shell Programming and Scripting

Writing Bash script

Could anyone help me to Write a script in BASH Shell to determine the percentage of system disk space you are using. (1 Reply)
Discussion started by: boris
1 Replies
Login or Register to Ask a Question