Skip to content

Instantly share code, notes, and snippets.

@davit
Last active June 30, 2024 03:40
Show Gist options
  • Save davit/8132961 to your computer and use it in GitHub Desktop.
Save davit/8132961 to your computer and use it in GitHub Desktop.
A small bash script that downloads, extracts and removes the zip/gz file.
#!/bin/sh
if [[ $1 =~ \.zip$ ]]; then
wget $1 && sudo unzip *.zip && sudo rm *.zip
elif [[ $1 =~ \.gz$ ]]; then
wget $1 && sudo tar -zxvf *.gz && sudo rm *.gz
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment