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
Combining files horizontally anshuljain HP-UX 3 03-14-2008 05:51 AM
Combining two files hemangjani Shell Programming and Scripting 7 06-13-2007 10:32 PM
Combining Two Files stevefox Shell Programming and Scripting 4 02-20-2006 05:09 AM
Combining Two Files bat711 Shell Programming and Scripting 3 10-05-2005 01:26 PM
Combining files Enda Martin UNIX for Dummies Questions & Answers 2 07-20-2001 10:31 AM

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 06-18-2001
apalex apalex is offline
Registered User
  
 

Join Date: May 2001
Location: NY
Posts: 39
combining files

how will i combine these 2 files below, with the desired output
specified below:

file1:
one
two
three
four

file2:
red
blue
yellow
green

file3:
aaa
bbb
ccc
ddd

desired output: (columns separated by tab)
file4:

one red aaa
two blue bbb
three yellow ccc
four green ddd

this is not a homework....job-related...
thanks,
alex
  #2 (permalink)  
Old 06-18-2001
Optimus_P Optimus_P is offline Forum Advisor  
flim flam flamma jamma
  
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
here is a shot in the dark. with out busting into perl or somethign (which i dont know)

would this logic work?

3 arrays (one for each file)
stuff the namespaces in the arrays with contents of the files.
spit out each namespace 1 at a time with a for or while loop. incrementing the array element at the end of each loop.
  #3 (permalink)  
Old 06-19-2001
mib mib is offline
Registered User
  
 

Join Date: Jan 2001
Location: Calicut
Posts: 228
paste file1 file2 file3



HTH
  #4 (permalink)  
Old 06-19-2001
Optimus_P Optimus_P is offline Forum Advisor  
flim flam flamma jamma
  
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
talk about an easy solution.


memo to self. man paste
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 01:05 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