I have 2 bash scripts that use a zip command but one script zip command gives the following error.
zip warning: name not matched: file1.txt file2.txt
This is the command that I am using in both scripts.
zip "${updates_zip}.patch.zip" $(ls)
I tried to print the directory’s contents and file1.txt and file2.txt exist but the zip command still gives the above error.
It seems in 1 script it considers file1.txt file2.txt
2 different files but in another script, it is considering file1.txt file2.txt
a single file having a space char in the name. However, I am not enclosing file names in quotes. Both scripts have the zip command written in exactly the same way as mentioned above.