我想重新创建这样的东西
if ( arg1 || arg2 || arg 3) {}
Run Code Online (Sandbox Code Playgroud)
我到目前为止,但我收到以下错误
line 11: [.: command not found
if [ $char == $';' -o $char == $'\\' -o $char == $'\'' ]
then ...
Run Code Online (Sandbox Code Playgroud)
我尝试了不同的方法,但似乎没有人尝试过我试过的一些方法
尝试在本地复制在编译时不存在的文件.例如:
remote_file "/httpfile" do
source "http://wiki.opscode.com/display/chef/Home"
mode "0666"
end
file "/httpfile.bak" do
content IO.read("/httpfile")
only_if {File.exists?("/httpfile")}
end
Run Code Online (Sandbox Code Playgroud)
这个代码将给予ERROR: No such file or directory -该eventough only_if正在使用.这是因为在IO.read文件进入系统之前的编译时发生.(4岁的电子邮件 - http://lists.opscode.com/sympa/arc/chef/2011-08/msg00182.html)
有没有办法强制IO.read("/httpfile")在执行时执行内容?或者现在更好的方法吗?
谢谢
我正在尝试使用Spring将对象传递给另一个类(我不确定我使用的是正确的术语,我对Spring来说是个新手):
TestServicesUtils.getTemplate().postForLocation(
"http://"
+ serverConfig
+ ":"
+ port
+ "/test/rest/TestResultService/insertTestResult/",
results);
Run Code Online (Sandbox Code Playgroud)
当我运行程序时,它到达该行并抛出Exception:
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
org.springframework.web.client.HttpClientErrorException: 404 Not Found
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:76)
Run Code Online (Sandbox Code Playgroud)
尝试连接的类:
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
org.springframework.web.client.HttpClientErrorException: 404 Not Found
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:76)
Run Code Online (Sandbox Code Playgroud)
路径似乎很好,我不知道为什么找不到该方法。我需要注册路径吗?
文件#1示例:
one two three
four five six
seven eight nine
eleven
Run Code Online (Sandbox Code Playgroud)
文件#2示例:
two
five
nine.not
eleven
Run Code Online (Sandbox Code Playgroud)
我想在文件#1上找到包含在文件#2上出现的任何单词的任何行,示例输出:
one two three
four five six
eleven
Run Code Online (Sandbox Code Playgroud)
我试图查看是否有办法在linux命令行中执行此操作,但尚未成功。有任何想法吗?
谢谢
bash ×2
chef-infra ×1
command-line ×1
file ×1
if-statement ×1
java ×1
linux ×1
maven ×1
resources ×1
spring ×1
syntax ×1
weblogic ×1