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 > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find/replace to new file: ksh -> perl McLan Shell Programming and Scripting 1 05-16-2008 03:14 AM
Find and Replace NycUnxer UNIX for Dummies Questions & Answers 4 03-06-2008 12:20 AM
find and replace pattren in file gopalss Shell Programming and Scripting 5 08-09-2007 03:06 AM
find and replace mahabunta UNIX for Dummies Questions & Answers 7 09-21-2006 12:05 PM
find and replace a pattern in a file krishnamaraju Shell Programming and Scripting 1 08-29-2006 10:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-14-2005
yankee428 yankee428 is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 27
Find replace within a file?

I build several files by using the cut command to grab select fields(columns) from a really bid csv file. Each file is one column of data. I then put them together using paste command. Here is the code built in tcsh:

cut -d , -f 1 some.csv > 1.csv
cut -d , -f 10 some.csv > 10.csv
paste 1.csv 10.csv > combined
rm 1.csv
rm 10.csv

Here is my Q? This leaves me with a data file, "combined" that is tab delimited (about 6 fields, no header row). I want it to be be a csv, how can i find/replace tab-stops with commas within the file?
  #2 (permalink)  
Old 06-14-2005
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,116
paste -d ',' 1.csv 10.csv > combined
  #3 (permalink)  
Old 06-15-2005
yankee428 yankee428 is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 27
Thanks vgersh99! That's perfect!
Sponsored Links
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 02:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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