Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 11-30-2012
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 22 April 2015, 12:29 PM EDT
Location: Zürich
Posts: 8,534
Thanks: 336
Thanked 1,065 Times in 928 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 Unix and Linux 11-30-2012
RudiC RudiC is offline Forum Advisor  
Registered User
 
Join Date: Jul 2012
Last Activity: 26 April 2015, 4:29 AM EDT
Location: Aachen, Germany
Posts: 5,756
Thanks: 101
Thanked 1,519 Times in 1,428 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 10:07 AM
Remove tab character from file figaro UNIX for Dummies Questions & Answers 4 01-21-2012 01:03 PM
How to remove the ^@ character in a file. machomaddy Shell Programming and Scripting 6 01-03-2012 11:26 PM
How to remove first 2 character from file name atul9806 Shell Programming and Scripting 8 06-14-2011 08:21 AM
How to remove new line character and append new line character in a file? sasikari HP-UX 8 10-27-2010 06:09 PM



All times are GMT -4. The time now is 05:44 AM.