幫我理解sed.I的語法,刪除了單引號,但代碼仍然不起作用。TCL腳本中的sed命令
set id [open file.txt]
# send the request, get a lot of data
set tok [::http::geturl "http://example.com"-channel $id]
# cut out the necessary data between two words
exec sed s/{"data1":\(.*\)/data2\1/ $id
close $id
set ir [open file.txt]
set phone [read $ir]
close $ir
puts $phone
的問題是,我從以下那種
{"id":3876,"form":"index","time":21,"data":"2529423","service":"Atere","response":"WAIT"}
護膝查詢得到的數據是語言的語法的元素,我需要削減完全之間的值字和大括號。如何在腳本中實現這一點。
44問/當在這裏搜索爲'使用sed [tcl]'。有些看起來很有希望。最好也更新你的Q以顯示需要的輸出。祝你好運。 – shellter