【发布时间】:2010-12-09 15:35:51
【问题描述】:
我有一个包含空格的目录列表。
我需要用 ' ' 将它们括起来以确保我的批处理脚本能够正常工作。
如何用 ' 和 ' (引号)包围每个新行。
例如
文件1:
/home/user/some type of file with spaces
/home/user/another type of file with spaces
到
文件2:
'/home/user/some type of file with spaces'
'/home/user/another type of file with spaces'
【问题讨论】:
-
你需要在字符串中引用撇号吗?
-
不只是围绕字符串。你知道 - 所以我的脚本在遇到带有空格的路径时不会失败。
标签: linux unix text directory grep