personal daily use scripts
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
for file in "$@"; do
|
||||
case "$file" in
|
||||
*.tar) tar xvf "$file" ;;
|
||||
*.tar.gz|*.tgz) tar xzvf "$file" ;;
|
||||
*.tar.bz2|*.tbz2) tar xjvf "$file" ;;
|
||||
*.tar.xz|*.txz) tar xJvf "$file" ;;
|
||||
*.zip) unzip "$file" ;;
|
||||
*.rar) unrar x "$file" ;;
|
||||
*.7z) 7z x "$file" ;;
|
||||
*.gz) gunzip "$file" ;;
|
||||
*.bz2) bunzip2 "$file" ;;
|
||||
*.xz) unxz "$file" ;;
|
||||
*) echo "Unknown archive type: $file" ;;
|
||||
esac
|
||||
done
|
||||
Reference in New Issue
Block a user