I wrote a terminal program in c that converts tabs to spaces. And I would like to see that it works and how many spaces were converted from tabs. The problem is when I create a file called input.txt and pipe it to the program, it just shows blanks for both tabs and spaces rather than the actual characters \t and \s. So I am wondering if there is an existing terminal command that could take the output of my program and replace tabs and spaces with \t and \s respectively:
cat input7.txt | ./detab abc def
Perhaps something like:
cat input7.txt | ./detab | command abc\s\s\sdef\s\s\s
Does such a command exist already?