Similar to `no-ansi-sgr` but removes all ANSI escape sequence, not just
the SGR ones.
See the previous commit bbf9a1da58 (bin:no-ansi-sgr: Set LC_ALL=C for
`[0-?]` range, 2025-07-30) for an explanation of why LC_ALL has to be
set.
8 lines
155 B
Bash
Executable File
8 lines
155 B
Bash
Executable File
#!/bin/sh
|
||
# SPDX-License-Identifier: MIT
|
||
# Copyright (c) 2025 Julian Prein
|
||
#
|
||
# Remove ANSI escape sequences.
|
||
|
||
env LC_ALL=C sed 's/\[[0-?]*[ -/]*[@-z]//g'
|