Project

General

Profile

Download (275 Bytes) Statistics
| Branch: | Revision:
#!/bin/sh

list=
for CONTROLLER in $(tw_cli show | grep -E "^c[0-9]+" | cut -f1 -d" "); do
for UNIT in $(tw_cli /${CONTROLLER} show | grep -E "^u[0-9]+" | cut -f1 -d" "); do
list=$list',{"{#UNIT}":"'/${CONTROLLER}/${UNIT}'"}'
done
done

echo '{"data":['${list#,}']}'
(2-2/14)