changes to tools/textviewer.sh