- > "${report_jsn}"
- printf "%s\n" "{ " >> "${report_jsn}"
- printf "\t%s\n" "\"start_date\": \"${start%_*}\", " >> "${report_jsn}"
- printf "\t%s\n" "\"start_time\": \"${start#*_}\", " >> "${report_jsn}"
- printf "\t%s\n" "\"end_date\": \"${end%_*}\", " >> "${report_jsn}"
- printf "\t%s\n" "\"end_time\": \"${end#*_}\", " >> "${report_jsn}"
- printf "\t%s\n" "\"total\": \"${total}\", " >> "${report_jsn}"
- printf "\t%s\n" "\"blocked\": \"${blocked}\", " >> "${report_jsn}"
- printf "\t%s\n" "\"percent\": \"${percent}\", " >> "${report_jsn}"
+ : >"${report_jsn}"
+ {
+ printf "%s\n" "{ "
+ printf "\t%s\n" "\"start_date\": \"${start%_*}\", "
+ printf "\t%s\n" "\"start_time\": \"${start#*_}\", "
+ printf "\t%s\n" "\"end_date\": \"${end%_*}\", "
+ printf "\t%s\n" "\"end_time\": \"${end#*_}\", "
+ printf "\t%s\n" "\"total\": \"${total}\", "
+ printf "\t%s\n" "\"blocked\": \"${blocked}\", "
+ printf "\t%s\n" "\"percent\": \"${percent}\", "
+ } >>"${report_jsn}"