Project

General

Profile

Download (275 Bytes) Statistics
| Branch: | Revision:
96ba0c24 Marc Dequènes (Duck)
#!/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#,}']}'