unzip few files but with same path and file name.

Hi Everyone,

For exmaple, i have 5 .zip files.

So i can do "unzip -L -o file1.zip -d /home/user1" for every 5 files. But the problem is those 5 zip files, have same path and file name. So if i use "-o", all will be overwirte.

The output is unzip all files, but put all unzipped files into a single file.

I know i can use "-d" to put 5 zip files into differient path, then "cat file1 file2 file3 file4 file5", but this is not efficient, can image if i have more zip files.

Please advice.
Thanks

ofile=newfile             ## output file
for file in *.zip         ## adjust pattern as necessary or use a list
do
  unzip -c "$file"
done > "$ofile"