# 1. Find colored lines # 2. Strip out useless lines # 3. Strip empty "colored" lines grep --color=never $'\x1b''\[[0-9;]*' \ | grep -vE 'Terraform has been|Initializing |use this backend unless the backend configuration changes|commands will detect it and remind you to do so if necessary|Refreshing state...|Read complete after |Reading...| copy_backend_before_init |Terraform has compared your real infrastructure|No changes.' \ | sed -E '/^'$'\x1b''\[0m'$'\x1b''\[32m/d'