I have a program that uses printf with some tput mixed in it and I'd like to pipe the output to stdout as well as a file. I'd prefer to use sed since I don't want any unnecessary dependencies on my script. Here's what I've got so far.printf \n$(tput setaf 6)| $(tput sgr0)$(tput setaf 7)Sourcing files...\033[m\n | tee install.logThe only issue with this is my log file is getting all of the color output as such...^[[36m| ^[(B^[[m^[[37mSourcing files...^[[mI'd like it to just have | Sourcing files...
How to strip color codes out of stdout and pipe to file and stdout
bash;shell script;bash script