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


Tags
control i, special characters, ^i

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
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 ?

Hi

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
    #2  
Old 11-30-2012
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 28 November 2014, 9:50 PM EST
Location: Zürich
Posts: 8,489
Thanks: 333
Thanked 1,050 Times in 916 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
    #3  
Old 11-30-2012
RudiC RudiC is offline Forum Advisor  
Registered User
 
Join Date: Jul 2012
Last Activity: 28 November 2014, 12:29 PM EST
Location: Aachen, Germany
Posts: 4,719
Thanks: 80
Thanked 1,173 Times in 1,102 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 11:25 PM.