First extraction method takes the xml file and extracts key-values
This commit is contained in:
7
pull_info.sh
Normal file
7
pull_info.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#curl -X GET http://192.168.1.42/wcd/system_consumable.xml -H "Cookie: ID=vGeeQa3qLQtd7sxYwl2jFOFUmQqIbuYN"
|
||||||
|
data=$(cat system_counter.xml)
|
||||||
|
for i in "Total" "DuplexTotal" "Document" "Paper" "TotalLarge" "PaperSizeA3" "PaperSizeA4";
|
||||||
|
do
|
||||||
|
value=$(cat system_counter.xml | xq ".MFP.Count.UserCounterInfo.TotalCounterList.TotalCounter | .[] | select(.Type==\"$i\") | .Count")
|
||||||
|
echo "Key: $i; Value: $value"
|
||||||
|
done
|
||||||
1384
system_counter_extract.yml
Normal file
1384
system_counter_extract.yml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user