我需要獲取現有目錄的絕對路徑並更改其中一個屬性。 我爲這個任務編寫了簡單的腳本,並且在我的linux機器上一切都很好。 SET "IGNITE_PATH=%cd%\standalone\configuration\ignite.xml"
sed -i -r "s#([email protected]\/scripts-dir-path=).*#\1%SCRIPTS_PATH%#g" .\stan
我試圖做的是有鹽的設置基於從for循環的$i當前值內部主機的IP。我已經嘗試了以下方法,但在修改包含以下行的網絡腳本時失敗:192.168.200.100,它存在於所有39個節點中。 for ((i=2; i<=30; i++)); do sudo salt -L "host$i.dev.mysite.com" cmd.run "sed -i "s/192.168.200.100/192.168.
我的問題是在sed的幫助下每出現一次包含子字符串「two」的單詞,但不要加倍單詞「兩節」本身 我迄今爲止嘗試: cat filename | sed 's/ \ (two\) /\1\1/g'
但我的問題是,它是重複的詞本身。 例如: two times twothird threetwothree
執行上述sed的操作是什麼我之後是: twotwo times twotwothird t