Grep 命令搜索文件夹中的文件并将文件移动到其他位置

Grep 命令搜索文件夹中的文件并将文件移动到其他位置,grep,find,cp,mv,Grep,Find,Cp,Mv,有人能帮我做这个命令吗 下面是我正在使用的代码 I have a text file which has list of file names, I want to search these file names in a folder which has thousands of files and move the matching files to different location on linux. #/bin/bash file=“/home/BILEKJ/reproces/da

有人能帮我做这个命令吗

下面是我正在使用的代码

I have a text file which has list of file names, I want to search these file names in a folder which has thousands of files and move the matching files to different location on linux.
#/bin/bash
file=“/home/BILEKJ/reproces/data.txt”
而IFS=读取-r行
做
mv“/home/BILEKJ/Reprocess/EDI855/$line”“/home/BILEKJ/Reprocess/Final855”>/dev/null 2>&1

完成尝试以下操作:

#!/bin/bash
file="/home/BILEKJ/Reprocess/data.txt"
while IFS= read -r line
do
    mv "/home/BILEKJ/Reprocess/EDI855/$line" "/home/BILEKJ/Reprocess/Final855" >/dev/null 2>&1
done <"$file"
file=“data.txt”
而IFS=读取-r行
做
mv“/your/path/$line”“/dest/path”>/dev/null 2>&1

完成文件名列表有多大?该列表有大约4000个文件名。这不起作用,read如何知道从哪个文件读取上面的数据command@user2231076 ..... 参见代码块中的第1行,
“data.txt”
只是一个示例。是的,我将输入文件名用作data.txt,但没有work@user2231076“不起作用”不是一个很好的描述,请显示文件中的几行。#/bin/bash while IFS=''read-r line do mv'/cygdrive/c/cygwin64/home/BILEKJ/reproces/EDI855/$line'/cygdrive/c/cygwin64/home/BILEKJ/reproces/Final855'>/dev/null 2>&1我正在运行脚本。/NewMove.sh data.txt
file="data.txt"
while IFS= read -r line
do
        mv "/your/path/$line"  "/dest/path" >/dev/null 2>&1
done <"$file"