Path : /proc/2/cwd/proc/3/root/proc/3/task/3/root/proc/3/root/var/lib/zabbix/ |
Current File : //proc/2/cwd/proc/3/root/proc/3/task/3/root/proc/3/root/var/lib/zabbix/bareos_queue.sh |
#!/bin/bash IFS=$'\n' log="$1" first=1 number=$(cat $log| grep -v "^$" | wc -l) echo -ne "{ \"data\" : [\n"; for i in $(seq 1 $number) do if [ $first == 0 ]; then echo -ne ",\n"; fi first=0 echo -ne "{" echo -ne " \"{#LNUM}\":\"$i\""; echo -ne " }"; done echo -ne " ]"; echo -ne " }\n";