I am actually creating a zip file based on a pdf file that I have downloaded through java code, so the problem statement is like this.
I have a pdf file with special symbols = (wallbay)+1-50 m+ ipad+i pho ne%watch.pdf
Now I want this file to be created as a zip file which should have a name = (wallbay\)+1-50m+ipad+iphone%watch.pdf.zip
I tried below commands :
cd /Users/rkr5/Downloads/admin && zip --symlinks -r \(wallbay\)+1-50m+ipad+iphone%watch.pdf.zip \(wallbay)+1-50 m+ ipad+i pho ne%watch.pdf
cd /Users/rkr5/Downloads/admin && zip --symlinks -r "\(wallbay)+1-50 m+ ipad+i pho ne%watch.pdf.zip" "\(wallbay)+1-50 m+ ipad+i pho ne%watch.pdf"
cd /Users/rkr5/Downloads/admin && zip --symlinks -r \(wallbay)+1-50 m+ ipad+i pho ne%watch.pdf.zip "\(wallbay)+1-50 m+ ipad+i pho ne%watch.pdf"
None of them are working and throwing error like "parse error near ``)'"
The only command that works is
cd /Users/rkr5/Downloads/admin && zip --symlinks -r \(wallbay\)+1-50m+ipad+iphone%watch.pdf.zip \(wallbay\)+1-50m+ipad+iphone%watch.pdf
But above commands work only when there is no whitespaces in pdf filename.
Currently my folder structure is
/Users/rkr5/Downloads/admin/(wallbay)+1-50m+ipad+iphone%watch.pdf.zip
/Users/rkr5/Downloads/admin/(wallbay)+1-50 m+ ipad+i pho ne%watch.pdf
I am using MacOs currently..