Removing control chars (including console codes / colours) from script output
If we redirect output to file in this pattern
top >> somefile.txt, we get lot of garbage value in the output. But for
top there is batch (
top -b -n1 >> somefile.txt) option where the file output is as desired. In case of programs like
nethogs there is no such options. Is there is good way to output in such case.