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
replace charandevu Shell Programming and Scripting 6 04-07-2008 11:30 AM
replace last / by | naikaa Shell Programming and Scripting 6 01-17-2008 02:19 AM
How to replace into Vi ravi.sadani19 Shell Programming and Scripting 5 06-25-2007 09:30 AM
Replace \n with \r\n Chanakya.m Shell Programming and Scripting 3 07-19-2006 07:20 AM
How to replace using SED? mahatma Shell Programming and Scripting 4 03-23-2006 03:04 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 09-06-2005
jda2001 jda2001 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 1
Exclamation Replace

I am currently appempting to replace line 1 from file 1 with line 1 from file 2 and so on down the list until EOF. Is there an easy way to do this? Example

File 1
idtoname 19783:1051144796:02:Fri Aug 12 07:25:24 2005
idtoname 19783:1051136412:02:Fri Aug 12 07:25:26 2005


File2
SysAdmin:DEV2:FileNet
SysAdmin:DEV2:FileNet


What I need to be the ultimate result is one file to read as follows:

SysAdmin:DEV2:FileNet:1051144796:02:Fri Aug 12 07:25:24 2005
SysAdmin:DEV2:FileNet:1051136412:02:Fri Aug 12 07:25:26 2005

Is this possible? Any suggestions? I am relatively new to the Unix world. I know VB well, but do not know a lot about Unix shell. Any help is appreciated.

Last edited by Perderabo; 09-06-2005 at 03:49 PM.. Reason: Disable smilies for readability
  #2 (permalink)  
Old 09-06-2005
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
Code:
 cut -d: -f2- file1.txt | paste -d'' file2.txt -
  #3 (permalink)  
Old 09-06-2005
adurga adurga is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 19
Quote:
Originally Posted by jda2001
I am currently appempting to replace line 1 from file 1 with line 1 from file 2 and so on down the list until EOF. Is there an easy way to do this? Example

File 1
idtoname 19783:1051144796:02:Fri Aug 12 07:25:24 2005
idtoname 19783:1051136412:02:Fri Aug 12 07:25:26 2005


File2
SysAdmin:DEV2:FileNet
SysAdmin:DEV2:FileNet


What I need to be the ultimate result is one file to read as follows:

SysAdmin:DEV2:FileNet:1051144796:02:Fri Aug 12 07:25:24 2005
SysAdmin:DEV2:FileNet:1051136412:02:Fri Aug 12 07:25:26 2005

Is this possible? Any suggestions? I am relatively new to the Unix world. I know VB well, but do not know a lot about Unix shell. Any help is appreciated.
I think your question should say 'column' instead of 'line'.

Last edited by Perderabo; 09-06-2005 at 03:49 PM.. Reason: Disable smilies for readability
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 10:30 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