Page 1 of 1

Fast way to replace all Tabs in text file with Pipe?

Posted: Thu Nov 14, 2013 10:31 pm
by Julie
Hi guys,

Anyone have a recommendation for the FASTEST way to replace all tab characters with the pipe symbol in HUGE text files?

Re: Fast way to replace all Tabs in text file with Pipe?

Posted: Fri Nov 15, 2013 4:33 am
by JimKnicely
Hi,

So far, the following has worked for me:

Code: Select all

sed -i 's/\t/|/g' file_name

Re: Fast way to replace all Tabs in text file with Pipe?

Posted: Fri Nov 15, 2013 3:58 pm
by Julie
Thank you, Jim! That works great on CentOS!