2013-01-23 48 views
0
cat some.properties 
/server/pdu/secure/enabled=true 
/pdu/secure/servers=aninath-lnx:49188 
/pdu/unsecure/servers= 
/secure/truststore/password=635db14e5350e23142c5c65e3caa50d7 
/ui/http/port=8100 
/ui/https/port=8443 

在執行以下命令慶典沒有這樣的文件或目錄錯誤時,拋出

**. some.properties** 
-bash: /server/pdu/secure/enabled=true: No such file or directory 
-bash: /pdu/secure/servers=aninath-lnx:49188: No such file or directory 
-bash: /pdu/unsecure/servers=: No such file or directory 
-bash: /secure/truststore/password=635db14e5350e23142c5c65e3caa50d7: No such file or directory 
-bash: /ui/http/port=8100: No such file or directory 
-bash: /ui/https/port=8443: No such file or directory 

我試圖從我已經使用 替換propertyName得到的PropertyValue。 some.properties 源some.properties 和我得到這些錯誤的

+0

你的問題是什麼? – exic

+0

是的,是嗎?你能更精確一點嗎?你在期待什麼?你之前用過貓嗎? – Josay

+0

@Josay更新了問題。 – anish

回答

0

只有字母,數字和下劃線是有效的字符形成Bash標識符,你不能使用斜線。

+0

然後我怎樣才能得到PropertyName的PropertyValue。 – anish

+0

@anish您正在使用斜線來定義您的變量,它們不是標識符的有效字符,而是bash將其解析爲命令並嘗試查找具有該名稱的文件並執行它。 – KurzedMetal

相關問題