当我执行cat test.txt
cat test.txt
`variable "bigip_management_ip" {
default = "54.210.108.205"
}`
然而,当我做vi的节目default = "54.210.108.205^[[0m"
时,我需要摆脱^[[0m
请帮忙
答案 0 :(得分:0)
能够使用
解决问题perl -e 'use Term::ANSIColor; print color "white"; print "ABC\n"; print color "reset";' | perl -pe 's/\x1b\[[0-9;]*m//g' < test.txt > variables.tf # Removes special characters lik ^[[0m