#!/bin/bash echo -n {"data":[ i=0 for l in `cat /usr/local/zabbix/script/urllist.txt` do if [ "$i" = "0" ]; then echo -n "{"{#DESTURL}":"$l"}" else echo -n ",{"{#DESTURL}":"$l"}" fi i=`expr $i + 1` done echo -n "]}"