danilojara123 danilojara123 - 6 months ago 6
Bash Question

Replace ^A symbol with space with a tab

I have a file where the lines look something like this:


I want to be able to remove the ^A characters. I have tried the tr command but I have not be able to get what I want. I tried this:

tr ^A \\t < myfile1 > myfile2

What would be the best way to do this ?

Thank you


^A is actually a single character ascii 0x01. It just has a "nickname" of control-A. So you can use this to replace it.

tr '\01' '\t'