From d6d47953d9b8760dedc8cdb1bcd1cf12c17d92d2 Mon Sep 17 00:00:00 2001 From: Larry Masinter Date: Sun, 8 Aug 2021 13:38:33 -0700 Subject: [PATCH] Add small utility 'lsee' to change lisp font-escapes to color changes (#399) --- scripts/lsee | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/lsee diff --git a/scripts/lsee b/scripts/lsee new file mode 100755 index 00000000..33b93c5a --- /dev/null +++ b/scripts/lsee @@ -0,0 +1,18 @@ +#!/bin/sh + +# Usage 'lsee file' +# translates CR as newline +# changes font-change control-characters ^F^x +# to linux color escapes: +# A regular +# B bold / bright +# C comment yellow +# D big/bold red + +export LANG=C +tr '\r' '\n' < $1 | \ + sed -e 's///g' \ + -e 's///g'\ + -e 's///g' \ + -e 's///g'\ + -e 's///g'