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
LabNum=(3 5 6)
for ARG in ${LabNum[@]};
do
` zip -r Lab$ARG Lab\ $ARG/*`
done
Thanks in advance