如何输入带有空格的路径? [英] How to input a path with a white space?
本文介绍了如何输入带有空格的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个主文件,它使用(从主我做一个源)一个属性文件,其中的变量指向路径.
I have a main file which uses(from the main I do a source) a properties file with variables pointing to paths.
属性文件如下所示:
TMP_PATH=/$COMPANY/someProject/tmp
OUTPUT_PATH=/$COMPANY/someProject/output
SOME_PATH=/$COMPANY/someProject/some path
问题是SOME_PATH
,我必须使用带空格的路径(我不能改变它).
The problem is SOME_PATH
, I must use a path with spaces (I can't change it).
我尝试用引号转义空格,但目前没有解决方案.
I tried escaping the whitespace, with quotes, but no solution so far.
我编辑了路径,单引号的问题是我在路径中使用了另一个变量 $COMPANY
I edited the paths, the problem with single quotes is I'm using another variable $COMPANY
in the path
推荐答案
使用以下三个变体之一:
Use one of these threee variants:
SOME_PATH="/mnt/someProject/some path"
SOME_PATH='/mnt/someProject/some path'
SOME_PATH=/mnt/someProject/some\ path
这篇关于如何输入带有空格的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文