Plan 9 from Bell Labs’s /usr/web/sources/contrib/yk/lab/novt

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/sed -f
# Removes terminal control sequences from input.

# /lib/ecma/ECMA-035.pdf:
#	13.2.2 Escape sequences of type nF
#	14.3 Designation of sets for grapfic characters
#	(incomplete but enough for local needs.)
s;[(-+./\-][0-?@-_];;g

# /lib/ecma/ECMA-048.pdf
#	5.2 Elements of C0 set
#		- backspace
s;.;;g
#	5.4 Control sequences
s;\[[0-?]*[ -/]*[@-~];;g
#	5.5 Independent control functions
s;[`-~];;g
#	5.6 Control strings
s;[_P\]X][-
 -~]*\\;;g

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.