TR -d Help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting TR -d Help
# 1  
Old 11-16-2009
TR -d Help

I want to strip off '\032' character from a file using:

tr -d '\032' < oldfile > newfile


this outputs the contents of oldfile to newfile, but I wanna do that in the same file i.e. remove the \032 character from the old file. I tried:

tr -d '\032' < oldfile > oldfile

But the oldfile contents were lost. How to do that in one cmd? Cannot use mv to rename new file to old.

Thanks
# 2  
Old 11-16-2009
if you have sed try the -i option, which can edit the file in place and edit as required.

Note: why double posted ?
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question