The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
vi or vim replace ,$ (eol) with just a comma dbauhaus UNIX and Linux Applications 6 10-02-2008 09:02 AM
How to replace all entries of comma in text file by space or other character prashant43 Shell Programming and Scripting 4 08-30-2008 12:53 AM
sed utility to replace /307 with comma obedkhan UNIX for Dummies Questions & Answers 1 02-06-2006 11:24 PM
Replace , (comma) with space mbarberis Shell Programming and Scripting 6 03-29-2005 10:35 AM
add comma alisevA3 UNIX for Dummies Questions & Answers 3 10-18-2002 09:29 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-14-2008
vikas_kesarwani vikas_kesarwani is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 17
Exclamation replace comma(,) with Tab

hi all,

i have a file with commas(,). i want to replace all the commas with tab(\t).

Plz help...its urgent...
  #2 (permalink)  
Old 11-14-2008
divzz divzz is offline
Registered User
  
 

Join Date: Mar 2008
Location: Bangalore
Posts: 20
awk 'BEGIN { FS=","; OFS=" " }
{print $0}' input
  #3 (permalink)  
Old 11-14-2008
labrazil labrazil is offline
Registered User
  
 

Join Date: Sep 2008
Location: San Diego, CA
Posts: 60
Code:
sed 's/,/\t/g' filename
see if that helps.
  #4 (permalink)  
Old 11-14-2008
dennis.jacob dennis.jacob is offline Forum Advisor  
dj -------
  
 

Join Date: Feb 2007
Location: Singapore/Bangalore/Cochin
Posts: 569
Try tr command

Code:
echo $var | tr ',' '\t'
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0