我想將幾行代碼傳遞給WebSphere配置文件。將多行代碼傳遞給wsadmin.sh?
這是我嘗試:
# ./wsadmin.sh -lang jython -c 'print("Hello")
> print("World!")'
這種打印出來的響應:它似乎忽略相同的代碼行
WAS7209I: Connected to process"<my profile name>" on node <node name> using SOAP connector; The type of process is: UnManagedProcess
Hello
注意。
當我嘗試在Python同樣的事情,它工作正常:
# python -c 'print("Hello")
> print("World!")
打印:
Hello
World!
我使用CentOS上的WebSphere 8.5版本7
注意:在得到Ram Vennam的回答之後,我在超級用戶上發佈了一個有關不同傾向的相關問題:https://superuser.com/q/939746/240375 - 這是我最終得到答案的地方。
你是對的,在Bash中正確的引用這些引號是一個噩夢;很好的澄清 – Edward