GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#!/bin/bash12# Wir wollen die Worte fuer alle Q-Klassen3for x in dir.* ; do45cd $x6DIRH=`pwd`78# Bereite File vor, in dem Befehle fuer GAP stehen9# Log-File: t-groups.log10echo LogTo\(\"t-groups.log\"\)\; > t-groups.out11echo RequirePackage\(\"carat\"\)\; >> t-groups.out12echo names := \[\]\; >> t-groups.out13echo GROUPS := \[\]\; >> t-groups.out14i=0;1516for y in ordnung.* ; do17cd $y1819for z in * ; do20cd $z2122for zz in group.* min.* max.* ; do23if [ -s $zz ] ; then24i=$[$i+1]25echo R := CaratReadBravaisFile\(\"$y/$z/$zz\"\)\; >> $DIRH/t-groups.out26echo P$i := Group\(R.generators\)\; >> $DIRH/t-groups.out27echo Append\(names,\[\"$y/$z/words.$zz\"\]\)\; >> $DIRH/t-groups.out28echo Append\(GROUPS,\[P$i\]\)\; >> $DIRH/t-groups.out29if [ -s words.$zz ] ; then30rm words.$zz31fi32fi33done3435cd ..36done37cd ..38done3940cd $DIRH4142# Nun sagen wir GAP noch, was es tun soll43echo "Print(GROUPS,\"\\n\");" >> t-groups.out44echo "Print(names,\"\\n\");" >> t-groups.out45echo "Size(GROUPS);" >> t-groups.out46echo "Size(names);" >> t-groups.out47echo Read\(\"..\/..\/TGROUPS.GAP\"\)\; >> t-groups.out48echo "for i in [1..Size(GROUPS)] do" >> t-groups.out49echo " SubgroupWords(GROUPS[i], names[i]);" >> t-groups.out50echo "od;" >> t-groups.out51echo "LogTo();" >> t-groups.out5253# wir starten GAP und lassen es die Files mit den Worten54# fuer die Untergruppen anlegen55gap -o 1524m < t-groups.out5657cd ..58done59606162