Page 1 of 1

Txt file tab problem

Posted: Tue May 04, 2010 4:07 am
by mayura
Unix file having spaces,blank lines and tabs
I am able to remove the spaces and blank lines but tabs are not removing from txt file.

Please help me out to remove the tabs coming in source file. :roll:

Re: Txt file tab problem

Posted: Tue May 04, 2010 4:30 am
by vkhandel
u can remove the tabs using "TR" command.

tr -d '\t' < {input file name} > {outut file name}

Posted: Tue May 04, 2010 5:30 am
by chulett
Tabs can be found (and thus removed) by using CHAR(9).

Re: Txt file tab problem

Posted: Wed May 05, 2010 5:56 am
by mayura
vkhandel wrote:u can remove the tabs using "TR" command.

tr -d '\t' < {input file name} > {outut file name}
hey thx

i have removed the tab by using tr command and redirect it into one file and then i have removed the blank lines and spaces and redirect it into original file..
:wink: