#!/bin/bash

输入指定目录和zip文件名

echo '请输入要解压的zip文件路径:' read zip_path

检查zip文件是否存在

if [ ! -f $zip_path ]; then echo '错误:文件不存在' exit 1 fi

echo '请输入要解压到的目录路径:' read target_path

检查目录是否存在

if [ ! -d $target_path ]; then echo '错误:目录不存在' exit 1 fi

解压zip文件到目标目录

echo '正在解压文件...' unzip -q $zip_path -d $target_path

echo '解压完成!'


原文地址: https://www.cveoy.top/t/topic/nysQ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录