LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-28-2006, 06:06 AM   #1
vineeth789
LQ Newbie
 
Registered: Jan 2006
Posts: 10

Rep: Reputation: 0
piping to 2 files simultaniously


hi all
i want to copy output of a file to b copied to 2 files simultaniously

ls>file.out
wud copy the content to only 1 file
and
ls>file1.out>fil12.out
does not work
so how can i do that
 
Old 01-28-2006, 06:20 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
ls | tee file.1 | tee file.2
 
Old 01-28-2006, 11:47 AM   #3
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
Quote:
Originally Posted by bigrigdriver
ls | tee file.1 | tee file.2
Good reply, but that's piping to 3 files!
 
Old 01-29-2006, 05:43 PM   #4
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 15
Posts: 546

Rep: Reputation: 43
try
ls | tee my_first_file 1> my_second_file
Should work
Ciao

eddiebaby1023
what suggestsed by bigrigdriver produces 2 files + the output on screen...
Ciao

Last edited by urka58; 01-29-2006 at 05:57 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with piping mijohnst Linux - General 7 10-21-2005 04:14 PM
Unzip + Piping iago Linux - Software 2 11-17-2004 02:11 PM
Piping output to text files corbis_demon Linux - General 3 10-12-2004 03:33 AM
Piping question OtisLinux Linux - Software 1 02-12-2004 01:38 PM
piping data tearinox Linux - Newbie 9 12-09-2003 01:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration