在 Bash 中将文件移动到位置,来自 2 个文本文件

In Bash move files to location, from 2 text files

我有一个文本文件中的文件列表,每行一个,另一个文本文件具有相应的位置以移动文件,每行一个。

如何在 bash 中执行(mv 文件在(文本文件 1 第 1 行)到位置(在文本文件 2 的第 1 行))?

分别从每个文件读取:

while read file1; read file2 <&3; do
   mv -- "$file1" "$file2"
done < file1.txt 3< file2.txt