1
我在執行這個終端指令,它只是罰款不同的工作:斯卡拉系統命令從命令行
curl -d "sentence=Jack sold the car to Jenny" austen.cs.illinois.edu:8082/parse
在另一方面執行的事情似乎並沒有在斯卡拉奏效:
import sys.process._
val output = s"""curl -d \"sentence=Jack sold the car to Jenny\" austen.cs.illinois.edu:8082/parse""".!!
println(output.split("\t"))
,輸出:
[error] % Total % Received % Xferd Average Speed Time Time Time Current
[error] Dload Upload Total Spent Left Speed
[error]
[error] 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: sold
[error] curl: (6) Could not resolve host: the
[error]
[error] 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: car
[error] curl: (6) Could not resolve host: to
[error] curl: (6) Could not resolve host: Jenny"
[error]
[error] 100 37 100 23 100 14 153 93 --:--:-- --:--:-- --:--:-- 153
思考爲什麼我在這裏看到不同的行爲?