zip command not working

Viewed 48702

I am trying to zip a file using shell script command. I am using following command:

  zip ./test/step1.zip $FILES

where $FILES contain all the input files. But I am getting a warning as follows

    zip warning: name not matched: myfile.dat

and one more thing I observed that the file which is at last in the list of files in a folder has the above warning and that file is not getting zipped.

Can anyone explain me why this is happening? I am new to shell script world.

7 Answers

I also encountered this issue. In my case, the line separate is CRLF in my zip shell script which causes the problem. Using LF fixed it.

Related