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
Help Required: Command to find IP address and command executed of a user loggedout Security 2 08-06-2008 08:12 PM
how to? launch command with string of command line options TinCanFury Shell Programming and Scripting 5 04-28-2008 06:06 PM
inconsistent ls command display at the command prompt & running as a cron job rajranibl SuSE 5 07-30-2007 08:26 AM
How to use more than one MPE command STREAM with Unix command in a single shell? bosskr HP-UX 1 10-16-2006 04:16 PM
How to use more than one MPE command STREAM with Unix command in a single shell? bosskr Shell Programming and Scripting 0 09-19-2006 09:44 PM

Closed Thread
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 03-24-2008
tkbharani tkbharani is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 42
cat command

Dear All

I have two text files File1.txt and File2.txt . I am concatenating the two files and making it as single file Cat_File.txt. Now i need to keep joined file in two different path. that is I need to use cat command only once ,but store joined file in two different locations. Since file size is huge, I trying to avoid second cat or move or copy.

Command used for cat
-----------------------
cat File1.txt File2.txt > /file_path/Cat_File.txt
  #2 (permalink)  
Old 03-24-2008
sank sank is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 24
Quote:
Originally Posted by tkbharani View Post
Dear All

I have two text files File1.txt and File2.txt . I am concatenating the two files and making it as single file Cat_File.txt. Now i need to keep joined file in two different path. that is I need to use cat command only once ,but store joined file in two different locations. Since file size is huge, I trying to avoid second cat or move or copy.

Command used for cat
-----------------------
cat File1.txt File2.txt > /file_path/Cat_File.txt
may be, you can try:
cat File1.txt File2.txt | tee file_path1/Cat_File.txt > file_path2/Cat_File.txt
  #3 (permalink)  
Old 03-24-2008
krishmaths krishmaths is offline
Registered User
  
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 191
tee

You can use tee to achieve this as below.
Code:
cat infile1 infile2 | tee outfile1 > outfile2
  #4 (permalink)  
Old 07-21-2008
vikrant poman vikrant poman is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 3
Hi

You can use following command
cat a b > /root/c
This will copy all the data in both the files a and b into the file c..
If file c is not present the this command will make it and append data into it...
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 08:06 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