Note here, .zip and .jar is just an example, my file extensions are different. Suppose I have a directory which can contain number of zip files
a.zip b.zip c.zip
AND/OR
z.jar x.jar y.jar
along with other contents.
I want to unzip them all.
I tried
unzip -q *.zip
and
unzip -q *.jar
But when the folder does not contain .jar files, the second command would fail
unzip: cannot find or open *.jar, *.jar.zip or *.jar.ZIP.
No zipfiles found.
This is problematic for me as it an error my script would exit. I want to silently unzip the *.zip and *.jar without errors. Is there anyway to accomplish this?