Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 01-22-2013
Scrutinizer's Unix or Linux Image
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 1 September 2015, 11:03 PM EDT
Location: Amsterdam
Posts: 10,432
Thanks: 359
Thanked 2,769 Times in 2,475 Posts
What have you tried so far?
Sponsored Links
    #3  
Old Unix and Linux 01-22-2013
PikK45 PikK45 is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 1 September 2015, 1:18 PM EDT
Location: Chennai
Posts: 573
Thanks: 50
Thanked 75 Times in 73 Posts
You are posting 4th question so far.! I am not sure of this number!! Linux

I bet you could do this by yourself Linux Linux
    #4  
Old Unix and Linux 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 Linux or Unix Question

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
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 06:33 AM.