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 Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
compare files in two directories and output changed files to third directory bkeep Shell Programming and Scripting 4 08-26-2009 06:58 AM
I need a script to find socials in files and output a list of those files NewSolarisAdmin Shell Programming and Scripting 1 02-19-2009 01:01 PM
comparing of two files with output which is not in both files suryanarayana Shell Programming and Scripting 2 02-04-2009 08:41 AM
eps or ps output files blann UNIX for Dummies Questions & Answers 6 07-13-2008 08:12 PM
split files into specified number of output files Migrainegirl UNIX for Dummies Questions & Answers 4 05-13-2008 09:38 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-28-2009
dear_abhi2007 dear_abhi2007 is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 8
Post Output of two files One After Another

Hi Can we put output of two files one after another?
For example i have two files.

File1.txt ---
Code:
CDTBIPX      UNIX      6624
CDTBIPX      UNIX      6625
CDTBIPX      UNIX      6626
CDTBIPX      UNIX      6627
File2.txt
Code:
20090928 11:30:01 6624 0
20090928 12:00:01 6625 0
20090928 12:30:00 6626 0
20090928 13:00:01 6627 0
Now i want then to arrange in one line like
Code:
CDTBIPX      UNIX      6624    20090928 11:30:01 6624 0
CDTBIPX      UNIX      6625    20090928 12:00:01 6625 0
CDTBIPX      UNIX      6626    20090928 12:30:00 6626 0
....
AND

Code:
UNIX      6624   11:30:01    CDTBIPX      
UNIX      6625   12:00:01    CDTBIPX      
UNIX      6626   12:30:00    CDTBIPX
Can you please help

Last edited by vgersh99; 09-28-2009 at 09:08 AM.. Reason: code tags, PLEASE!
  #2 (permalink)  
Old 09-28-2009
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
look into 'man paste'

---------- Post updated at 09:08 AM ---------- Previous update was at 09:07 AM ----------

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
  #3 (permalink)  
Old 09-28-2009
uthay85 uthay85 is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 11
please find the commands

1st output - paste File1.txt File2.txt
2nd outupt - paste File1.txt File2.txt|awk '{print $2,$3,$5,$1}'
  #4 (permalink)  
Old 09-30-2009
dear_abhi2007 dear_abhi2007 is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 8
thanks

Quote:
Originally Posted by uthay85 View Post
please find the commands

1st output - paste File1.txt File2.txt
2nd outupt - paste File1.txt File2.txt|awk '{print $2,$3,$5,$1}'


thnaks dear, this was really helpful.
Reply

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 09:28 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