我正在使用这个命令
cat text.csv | while read a ; do grep $a text1.csv >> text2.csv; done
text.csv 具有带有完整路径的文件名。文件名有空格。
示例:C:\Users\Downloads\File Name.txt
text1.csv 包含显示用户 ID 和带有完整路径的文件名的日志。
示例:MyName,C:\Users\Downloads\File Name.txt
当我运行命令时,我得到了错误
grep: Name: No such file or Directory
我知道错误是因为文件名中的空格。我想知道如何消除此错误。