我正在尝试编写一个脚本来读取带有文件名的文件,并输出是否在目录中找到了这些文件。
从逻辑上讲,我认为它是这样的:
$filelist = prompt for file with filenames
$directory = prompt for directory path where find command is performed
new Array[] = read $filelist line by line
for i, i > numberoflines, i++
if find Array[i] in $directory is false
echo "$i not found"
export to result.txt
我一直很难让 Bash 做到这一点,有什么想法吗?