Last active
March 22, 2023 13:57
-
-
Save DineshSolanki/dfc638674c7777bb8bf8891e64377f59 to your computer and use it in GitHub Desktop.
remove ansi escape code from log files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" input_file > output_file | |
(Get-Content input_file) -replace "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "" | Set-Content output_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment