LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-26-2008, 12:23 AM   #16
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910

Quote:
Originally Posted by CoffeeKing!!! View Post
I've used tee to copy files. I just have to manually enter the file numbers myself.

me@me:~/Desktop$ cp wavotmp3.sh | tee wavotm31.sh wavotmp32.sh wavotmp33.sh

and I get:

cp: missing destination file operand after `wavotmp3.sh'
Try `cp --help' for more information.



The files show up but, I get that error. Does anyone know why?
I'm looking for something similar to similar to tee or cp so I don't stray to far from novice commands for now.
And the problem there is that cp requires two parameters;
to "copy" using tee you just want to cat the file.
Code:
cat wavotmp3.sh | tee wavotm31.sh wavotmp32.sh wavotmp33.sh
What you would have gotten (in verbose mode) if you hadn't
omitted the target to copy is the output of the successful
copy command in three separate files.



Cheers,
Tink
 
Old 08-26-2008, 03:44 PM   #17
CoffeeKing!!!
Member
 
Registered: Mar 2008
Posts: 117

Original Poster
Rep: Reputation: Disabled
Thanks for the help guys. I'll throw this in when I get to the scripting part of the book I'm reading.
 
Old 09-06-2013, 07:41 AM   #18
AmyOrchid
LQ Newbie
 
Registered: Oct 2011
Posts: 1

Rep: Reputation: Disabled
Interesting finding

Hi all,

This thread is old. Hope any one can see my reply.
You can use following command:
Code:
cat copy_file |tee file_name{1..5}
It will out filename1 filename2, filename3, filename4, filename5.
Hope this is the results you want.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
My error in mkisofs command to make a command line iso mg92865 Linux - Newbie 1 06-20-2008 12:43 PM
[SOLVED] How can I make an .iso file from a CD or DVD using the command line? rm_-rf_windows Linux - General 3 06-20-2007 09:29 AM
Multiple Command-Line Programs skibud2 Linux - Software 1 03-18-2007 07:17 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 08:45 PM
Multiple tty in command line tearinox Linux - General 2 02-12-2004 11:28 AM


All times are GMT -5. The time now is 12:44 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration