How to remove ^I character from a UNIX file ? | Unix Linux Forums | Shell Programming and Scripting

  Go Back    

Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

How to remove ^I character from a UNIX file ?

Shell Programming and Scripting

control i, special characters, ^i

Closed Thread    
Thread Tools Search this Thread Display Modes
Old 11-30-2012
rakeshkumar rakeshkumar is offline
Registered User
Join Date: Dec 2010
Last Activity: 6 May 2014, 5:25 AM EDT
Posts: 103
Thanks: 35
Thanked 0 Times in 0 Posts
How to remove ^I character from a UNIX file ?


When i used :set list in vi , i have seen a lot ^I characters in my file. Could anyone please help me how to remove this characters ?

Issue : When i used awk to combine two file (one of the file has ^I characters) then my output is different than what am expecting, one of column being truncated.

Any help is much appreciated
Sponsored Links
Old 11-30-2012
Scott's Avatar
Scott Scott is online now Forum Staff  
Join Date: Jun 2009
Last Activity: 30 January 2015, 2:48 AM EST
Location: Zürich
Posts: 8,499
Thanks: 334
Thanked 1,054 Times in 918 Posts
They're tab characters. Without seeing any of your code I can't say how you might otherwise get around your problem, or why it's even causing a problem, or whether removing them or replacing them would help.
Sponsored Links
Old 11-30-2012
RudiC RudiC is offline Forum Advisor  
Registered User
Join Date: Jul 2012
Last Activity: 29 January 2015, 5:38 PM EST
Location: Aachen, Germany
Posts: 5,146
Thanks: 89
Thanked 1,318 Times in 1,239 Posts
^I is the <TAB> character, separating fields in your file. You cann deal with it from within awk, e.g. by setting <TAB> as the field separator or by removing it when working on a line. You can enter it using "\t" in most awk implementations.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remove ^L character from a file skhichi Shell Programming and Scripting 9 06-22-2012 11:07 AM
Remove tab character from file figaro UNIX for Dummies Questions & Answers 4 01-21-2012 02:03 PM
How to remove the ^@ character in a file. machomaddy Shell Programming and Scripting 6 01-04-2012 12:26 AM
How to remove first 2 character from file name atul9806 Shell Programming and Scripting 8 06-14-2011 09:21 AM
How to remove new line character and append new line character in a file? sasikari HP-UX 8 10-27-2010 07:09 PM

All times are GMT -4. The time now is 03:51 AM.