Solutions that I have come across for replacing the contents of an input file with converted output involve using a temp file or the sponge utility.
Stephane Chazelas'sStephane Chazelas's answeranswer here indicates another way involving opening the file in read-write mode as below.
tr ' ' '\t' < file 1<> file
How does this actually work without corrupting the file in question?
 
                