# toMapleseq.sh 012345 (say) converts a sequence in # the database to Maple format # Note to myself: remember to maintain the link # ln toMapleseq.sh /usr/njas/wwwfiles/sequences/toMapleseq.sh.txt # If you download this from my web page, it is important to # use the SOURCE FILE. DON'T mouse it off the screen # because many of the characters will not be visible. # The name of this program is toMapleseq.sh (not toMapleseq.sh.txt). # Last modified Dec 31 1996 # Comments revised Nov 02 2002 # Speeded up Jan 04 2005 if [ "$#" -ne 1 ] then echo "Incorrect no of arguments. Usage: toMapleseq.sh 011234 >out then Maple junk7700 if $GREP "^%V" junk7700 >/dev/null then cat junk7700 | sed '/^%[^VWX]/d s/...........//' | tr "\012" " " | sed 's/^/s1:=[/ s/$/];/' else cat junk7700 | sed '/^%[^STU]/d s/...........//' | tr "\012" " " | sed 's/^/s1:=[/ s/$/];/' fi