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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Extracting information from text fields. spindoctor UNIX for Dummies Questions & Answers 24 06-09-2007 01:17 PM
How do I strip and add tabbed fields to a long text file? saint65 Shell Programming and Scripting 3 02-21-2007 02:18 AM
Need a Help with sort a text file with some fields alexcol Shell Programming and Scripting 3 02-19-2007 03:13 AM
Last fields Khoomfire UNIX for Advanced & Expert Users 3 04-13-2006 05:03 PM
Awk - more than 99 fields? DaveM UNIX for Dummies Questions & Answers 2 01-23-2001 01:34 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-16-2008
shocker shocker is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 2
combining fields in two text fields

Can someone tell me how to do this using sed, awk, or any other basic shell scripting? Basically I have two text files with the following contained in each file:

File A:
a b c
d e f
g h i


File B:
1
2
3

I want the final outcome to look like this:

a b c 1
d e f 2
g h i 3

How would I do this? Thanks in advance!
  #2 (permalink)  
Old 01-16-2008
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,509
welcome.
try to use the search function next time.
  #3 (permalink)  
Old 01-16-2008
shamrock shamrock is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2007
Location: USA
Posts: 750
Code:
paste -d " " file1 file2
  #4 (permalink)  
Old 01-16-2008
shocker shocker is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 2
Quote:
Originally Posted by shamrock View Post
Code:
paste -d " " file1 file2
Awesome! Thanks!
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 10:04 AM.


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