danilojara123 danilojara123 - 2 years ago 76
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

Answer Source

^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'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download