Last active
August 8, 2023 03:12
-
-
Save naranyala/ccc2776cac6c04326ded65fe0ce4ee5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if the zip file argument is provided | |
if [ -z "$1" ]; then | |
echo "Please provide the path to the zip file as the first argument." | |
exit 1 | |
fi | |
# Verify if the zip file exists | |
zip_file="$1" | |
if [ ! -f "$zip_file" ]; then | |
echo "File not found!" | |
exit 1 | |
fi | |
# Extract the file to the current directory | |
unzip "$zip_file" -d . | |
echo "Extraction complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment