replace ascii chars without loosing it.

Hi,
Can some one tell, how to replace ascii non printable TAB from the while to something, then later on replace it back to TAB.

Basciallz we do bulk data processing, our processin treats TAB as new field ,
So I thought we can replace it with something and later on revert it.

TIA

check out the tr utility man tr

tr -s '\t' ':'

tr changes tabs to colons in this example

Hi,
thanks, however irrespective of any number of occurences of tab 'tr' will replace each occurences with single occurence(replacable) chars.

i.e input is

note : pls read {1\t} as 1 tab and {2\t} as 2 tabs

the statement cat abc | tr -s '\t' '#' replace any number of occurences on each line to just one. However I wanna retain the number of each occurences in this case number of tabs, so that after processing I can put it back in the respective places.

Hope I'm clear

Don't use the -s (squeeze) option of tr and it will perform a one-for-one replacement...

$ printf "\t\t\t\n" | tr '\t' '#'
###

Thanks, it gave me some idea, but doesn#t exaclty suit my requirement, so i tried with sed and it works.