LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-27-2005, 08:00 AM   #1
ice_hockey
LQ Newbie
 
Registered: Apr 2005
Posts: 11

Rep: Reputation: 0
Sed(?); Appending a comma-delineated file


This should be an easy question for the gurus out there:

I have a comma-delineated file in the form

A:B:C:
D:E:F:
G:H:I:

And another file in the form:

X
Y
Z

I want to join the two files (perhaps with sed) so they look like:

A:B:C:X:
D:E:F:Y:
G:H:I:Z:

All advice is welcome.
 
Old 05-27-2005, 08:16 AM   #2
mschutte
Member
 
Registered: Jan 2005
Location: Innsbruck, Austria
Distribution: Debian GNU/Linux Lenny
Posts: 68

Rep: Reputation: 15
Assuming your files' names are 'a' and 'b':
$ paste -d '' a b > c
writes the results to 'c'.
If you use other values for -d (i.e. -d ','), you can set a delimiter used to separate 'a's contents from 'b'.

Hope I could help,
mschutte
 
Old 05-27-2005, 08:42 AM   #3
ice_hockey
LQ Newbie
 
Registered: Apr 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSL VPN appending /etc/hosts file zajelo3 Linux - Security 0 02-06-2005 06:31 PM
Reading comma-separated data from file MeLassen Programming 4 04-04-2004 02:41 PM
Appending a string to a file JStew Linux - General 13 03-04-2003 03:48 PM
sending a mail appending a file saavik Linux - Newbie 4 07-12-2002 03:50 AM
comma delimited file cdragon Programming 5 06-21-2002 07:55 PM


All times are GMT -5. The time now is 10:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration