我要在分配的变量中打印错误
Dim sNode1 As String
With ThisWorkbook.Worksheets("Sheet1")
'This nodeList is retrieving the values inside the DIV class="a69"
'it's a list of products
sNode1 = NodeList1.Item(0).innerText
For i = 0 To NodeList.Length - 1
.Cells(i + 1, 1) = NodeList.Item(i).innerText
.Cells(i + 1, 8) = sNode1
Next
End With
答案 0 :(得分:0)
您需要使用stderr
将stdout
重定向到2>&1
,如果命令有错误,您将得到错误:
#!/bin/bash
a=$(vertica copy query 2>&1) # if i got error here
echo $a