Ubuntu shell 脚本 - 扫描驱动器以查找档案:错误:没有更多文件

问题描述

我已经安装了软件包

p7zip-full

对于 ubuntu,我正在运行以下名为 7z 的 shell 脚本,并将其放置在与数据集压缩文件相同的目录中

#!bin/sh
mkdir ./min6dB
mkdir ./0dB
mkdir ./6dB
7z -omin6dB -y x ./-6_dB_valve.zip
7z -omin6dB -y x ./-6_dB_pump.zip

数据集文件夹如图所示

enter image description here

我收到以下错误

Scanning the drive for archives:

ERROR: No more files

虽然这个特定文件存在于我的目录中。 我该如何解决这个问题?

我使用适用于 Windows 10 的 Ubuntu 应用。

enter image description here

解决方法

不得不像上面那样重写:

#!/bin/sh
mkdir ./min6dB
mkdir ./0dB
mkdir ./6dB
unzip ".\-6_dB_pump" -d min6dB
unzip ".\-6_dB_valve" -d min6dB
unzip 6_dB_valve -d 6dB
unzip 0_dB_valve -d 0dB
unzip 0_dB_pump -d 0dB
unzip 0_dB_fan -d 0dB