awk '
$1 == "Group" {printf("\section{%s%d}\n", $1, $2); next}
{for (i=1; i<=NF; i++)
if ($i ~ /^[0-9][0-9][0-9]$/) {
printf("\Testdetails{%d}\n", $i)
break
}
}
'
Atualizar com base no comentário:
awk '
$1 == "Group" {printf("\section{%s %d}\n", $1, $2); next}
{
title = sep = ""
for (i=1; i<=NF; i++)
if ($i ~ /^[0-9][0-9][0-9]$/) {
printf("\subsection{%s} \Testdetails{%d}\n", title, $i)
break
}
else {
title = title sep $i
sep = FS
}
}
'