Path : /proc/2/task/2/root/proc/3/root/proc/self/root/proc/2/cwd/var/lib/zabbix/ |
Current File : //proc/2/task/2/root/proc/3/root/proc/self/root/proc/2/cwd/var/lib/zabbix/exabgp_dnsdist.sh |
#!/bin/bash IFS=$'\n' dir="$1" first=1 names=$(ls -1 $dir) echo -ne "{ \"data\" : [\n"; echo "$i" for i in $names { if [ $first == 0 ]; then echo -ne ",\n"; fi first=0 echo -ne "{" echo -ne " \"{#ROUTENAME}\":\"$i\""; echo -ne " }"; } echo -ne " ]"; echo -ne " }\n";