#!/bin/bash

DEVS=`ip netns|grep "qrouter"`
POSITION=1
echo "{"
echo " \"data\":["
for DEV in $DEVS
do
    if [ $POSITION -gt 1 ]
    then
        echo ","
    fi
    echo -n " { \"{#IFNAME}\": \"$DEV\"}"
    POSITION=$[POSITION+1]
done
echo ""
echo " ]"
echo "}"
