LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Sed(?); Appending a comma-delineated file (http://www.linuxquestions.org/questions/linux-general-1/sed-%3B-appending-a-comma-delineated-file-327640/)

ice_hockey 05-27-2005 08:00 AM

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.

mschutte 05-27-2005 08:16 AM

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

ice_hockey 05-27-2005 08:42 AM

Thanks!


All times are GMT -5. The time now is 12:03 AM.