CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Path: gap4r8 / tst / remake.sh
Views: 418346
1
#! /bin/sh
2
input0=/tmp/gapinput0.$$
3
input=/tmp/gapinput.$$
4
logfile=/tmp/gaplog.$$
5
prelogfile=/tmp/gapprelog.$$
6
sedscript=/tmp/sedfile.$$
7
cat > $sedscript <<EOF
8
/^#/ p
9
/^$/ p
10
/^ \+$/ p
11
/^\(gap\)\?> / !d
12
s/^\(gap\)\?> //
13
EOF
14
sed -f $sedscript < $1 > $input0
15
cat - $input0 > $input <<EOF
16
LogTo("$prelogfile");
17
EOF
18
cat $input - > $input0 <<EOF
19
LogTo();
20
quit;
21
EOF
22
gap -A -x 80 < $input0 > /dev/null
23
cat > $sedscript <<EOF
24
s/^gap> #/#/
25
s/^gap> \+$//
26
/^GAP4stones: / d
27
/^gap> LogTo();/ d
28
EOF
29
sed -f $sedscript < $prelogfile > $logfile
30
echo result in $logfile
31
32