I'm creating a bsh shell to unzip a file from one directory into another. The directory that holds the zip files has zip files constantly being added to it, so I am testing it before it does the unzip and more.
Right now my code looks like this:
unzip -tq $ZIP_PATH/$ZIP_NAME >/dev/null
if [ $? != 0 ]
then
echo "$ZIP_NAME is not a complete file."
else
# --- unzip file and move completed zip to new location ---
echo "unzipping $ZIP_NAME"
unzip -q $ZIP_PATH/$ZIP_NAME -d $DATA_DIR/$ISBN_NAME
mv $ZIP_PATH/$ZIP_NAME $DONE_PATH/$ZIP_NAME
I'm trying to suppress the large error message that pops up in my unix screen when the unzip test fails. It continues to show up now matter what. Is there any way to make it not show up?
I tried that as well as some variations earlier, but the test error message won't stop popping up in the tests that I run. I get a paragraph about the end of central directory not found. It executes as it's supposed to but the error message won't go away.