#! /bin/bash -e
# Last edited on 2026-01-16 17:49:40 by stolfi

# Extracts the comments from the current versions of the text files
# ans saves them to "cmts25e1-${tag}.txt" where ${tag} is "T1", "T2", etc.

for tf in \
  T1:../074/text25e1.ivt \
  T2:../074/star25e1.ivt \
  T3:../076/SAVE/2025-07-15-200047/starps-U.eva \
; do
  tag="${tf/:*/}"
  tfile="${tf/*:/}"
  cat ${tfile} \
    | gawk \
        ' /^<f[0-9]+[rv][0-9]*[.]/ { print $1; next; } \
          // { print; next; }
        ' \
    > cmts25e1-${tag}.txt
done
dicio-wc cmts25e1-T*.txt
