因爲conf.properties是從window上傳到centos中的,執行腳本的時候需要從這個文件讀取配置信息;
在讀取的時候打印的日誌信息如:
printf("------[%s]", command);
結果:]-----[run g1.xml 1.wav
期望結果:------[run g1.xml 1.wav]
在linux執行:file conf.properties
顯示 conf.properties: ASCII text, with CRLF line terminators
在linux新建文件,執行 file操作
顯示 config1.properties: ASCII text
執行如上的操作:
結果:------[run g1.xml 1.wav]
總結:window和linux的換行符(crlf,lf)不一樣,解析出來的字符串也不一樣