Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How to remove ^I character from a UNIX file ?

Shell Programming and Scripting

control i, special characters, ^i

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


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 Unix and Linux 11-30-2012
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Join Date: Jun 2009
Last Activity: 18 August 2017, 4:31 AM EDT
Location: Zürich
Posts: 8,627
Thanks: 347
Thanked 1,111 Times in 959 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 Unix and Linux 11-30-2012
RudiC RudiC is online now Forum Staff  
Join Date: Jul 2012
Last Activity: 22 August 2017, 7:11 AM EDT
Location: Aachen, Germany
Posts: 11,186
Thanks: 287
Thanked 3,449 Times in 3,177 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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 07:15 AM.