#!/bin/bash

ftype="$(file "$1")"

case "$ftype" in
"$1: Zip archive"*)
unzip "$1";;
"$1: gzip compressed"*)
gunzip "$1";;
"$1: bzip2 compressed"*)
bunzip2 "$1";;
*) echo "File $1 can not be uncompressed with smartzip";;
esac

相关文章:

  • 2022-01-06
  • 2022-12-23
  • 2022-02-03
  • 2021-08-15
  • 2021-10-17
  • 2021-10-30
  • 2022-12-23
猜你喜欢
  • 2021-06-13
  • 2021-09-26
  • 2021-04-24
  • 2022-12-23
  • 2021-07-14
  • 2021-08-15
相关资源
相似解决方案