Changing only the first space to a tab in a space delimited text file | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Changing only the first space to a tab in a space delimited text file

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-22-2013
evelibertine evelibertine is offline
Registered User
 
Join Date: May 2011
Last Activity: 22 August 2014, 5:12 AM EDT
Posts: 193
Thanks: 94
Thanked 0 Times in 0 Posts
Changing only the first space to a tab in a space delimited text file

Hi,

I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks!
Sponsored Links
    #2  
Old 01-22-2013
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 22 October 2014, 8:25 PM EDT
Location: Amsterdam
Posts: 9,538
Thanks: 284
Thanked 2,422 Times in 2,172 Posts
What have you tried so far?
Sponsored Links
    #3  
Old 01-22-2013
PikK45 PikK45 is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 10 July 2014, 12:57 PM EDT
Location: Chennai
Posts: 567
Thanks: 43
Thanked 74 Times in 72 Posts
You are posting 4th question so far.! I am not sure of this number!!

I bet you could do this by yourself
    #4  
Old 01-24-2013
Vi-Curious Vi-Curious is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 13 May 2014, 6:14 PM EDT
Location: Texas
Posts: 151
Thanks: 1
Thanked 2 Times in 2 Posts

Code:
:%s/<space>/<tab>/

The Following User Says Thank You to Vi-Curious For This Useful Post:
evelibertine (01-24-2013)
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
How to echo space or tab delimited values into rows? adshocker UNIX for Dummies Questions & Answers 5 07-19-2011 07:38 AM
Deleting columns from a space delimited text file evelibertine UNIX for Dummies Questions & Answers 3 05-31-2011 05:47 PM
Merging files into a single tab delimited file with a space separating Lucky Ali Shell Programming and Scripting 3 11-14-2009 01:10 PM
Converting Space delimited file to Tab delimited file jeevs81 UNIX for Dummies Questions & Answers 16 02-26-2009 01:49 AM
Searching for text in a Space delimited File andyblaylock UNIX for Dummies Questions & Answers 6 11-27-2007 06:33 PM



All times are GMT -4. The time now is 01:10 AM.