s/\x1B\[[0-9]*\w//g的Sed命令似乎能够完成任务,但是否有比只是将正则表达式复制粘贴到我的所有脚本中更简洁的方法?
(*) 至少在工具试图在您的深色背景终端上显示暗红色错误之前是这样。
s/\x1B\[[0-9]*\w//g的Sed命令似乎能够完成任务,但是否有比只是将正则表达式复制粘贴到我的所有脚本中更简洁的方法?
(*) 至少在工具试图在您的深色背景终端上显示暗红色错误之前是这样。
Name : ansifilter
From repo : updates
Summary : ANSI terminal escape code converter
URL : http://www.andre-simon.de/doku/ansifilter/ansifilter.php
License : GPLv3+
Description : Ansifilter handles text files containing ANSI terminal escape codes.
: The command sequences may be stripped or be interpreted to generate formatted
: output (HTML, RTF, TeX, LaTeX, BBCode).
--no-color标志来运行。许多其他命令也有类似的标志。 - Moshe Katzbower。 - Guss