Comment 3 for bug 58498

Confirmed. The problem is that the /bin/sh symlink to bash got replaced by dash for performance reasons. To resolve the bug, just edit /usr/lib/texmacs/TeXmacs/bin/maxima_detect and change to first line to #!/bin/bash

This possibly affects all scripts in /usr/lib/texmacs/TeXmacs/bin/

Could the package maintainer please fix the package and push the patches upstream. If a script is not compatible with sh (uses bash specific features) it has to point to /bin/bash. Therefore this is not a bug in Debian/Ubuntu, but rather an upstream problem.