【发布时间】:2015-10-16 14:28:01
【问题描述】:
我需要使用 for 循环运行以下命令
cat Locate\ Message.eml | ./locatePipe.php
我正在尝试以下操作,但它似乎在文件名中的第一个空格处中断
for i in $(find -name "*.eml"); do cat $i | ./locatePipe.php; done
如果重要的话,一些文件名包含“@”、“()”、“-”、“.”、“[]”、“'”
【问题讨论】:
-
Allowing punctuation characters in directory and file names in bash、for name in
lsand filenames with spaces、for loop through files with spaces and some special characters、Deleting filenames that have space and special characters、How do I enter a file or directory name containing spaces or special characters in the terminal?等
标签: bash for-loop pipe special-characters filenames