running a zip command in a bash script
Hello all, I'm very new to writing bash scripts (wrote my first one this Sunday) and I'm trying to zip a group of files. It has to be in zip format so alternatives like tar won't work here. I have my script in a folder which has a bunch of Sub-directories in the format "Lab\ 3" "Lab\ 5" "Lab\ 6" etc
What I'd like to be able to do is take all of the files (just the contents not the folder itself) in the "Lab\ 3" Folder and put them in Lab3.zip. I'm really close but no matter what I try I keep getting the folders put into the zip file instead of the Folders contents Code:
#!/bin/bash |
you could add a second level of loop and use zip -g (grow/append) to add each files one after the other. You can "cd" into the directory just before and use
Code:
for FILE in `ls`;do |
Thanks
Quote:
Code:
#!/bin/bash |
All times are GMT -5. The time now is 12:17 AM. |