Skip to content

Instantly share code, notes, and snippets.

@naranyala
Last active August 8, 2023 03:12
Show Gist options
  • Save naranyala/ccc2776cac6c04326ded65fe0ce4ee5f to your computer and use it in GitHub Desktop.
Save naranyala/ccc2776cac6c04326ded65fe0ce4ee5f to your computer and use it in GitHub Desktop.
#!/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