How to replace TAB in file

18. December 2014 SysAdmin 0

If you have a large file and you want to replace TAB with a comma or a new Text. Please use the below command from a Linux Bash Shell

sed  's/t/NEWTEXT/g' inputfile.txt > outfile.txt

Eg: Replace TAB to Comma
sed  's/t/,/g' inputfile.txt > outfile.txt

Leave a Reply

Your email address will not be published. Required fields are marked *