#!/bin/bash if [ "$REQUEST_METHOD" = "POST" ]; then challenge_id="${FORM_DATA[challenge_id]}" notes="${FORM_DATA[notes]}" editor="${FORM_DATA[editor]:-Anonymous}" if [ -n "$challenge_id" ]; then [ ! -f data/team-notes.txt ] && touch data/team-notes.txt grep -v "^${challenge_id}|" data/team-notes.txt > data/team-notes.tmp 2>/dev/null || touch data/team-notes.tmp if [ -n "$notes" ]; then timestamp=$(date "+%Y-%m-%d %H:%M:%S") echo "${challenge_id}|${notes}|${editor}|${timestamp}" >> data/team-notes.tmp fi mv data/team-notes.tmp data/team-notes.txt echo '