[clue] "Tee" copy??

Dan Duncan danduncan at gmail.com
Sat May 31 00:27:19 MDT 2014


It works.

$ cat ls | tee /tmp/ls.1 > /tmp/ls.2
$ sum ls /tmp/ls*
44762   131 ls
44762   131 /tmp/ls.1
44762   131 /tmp/ls.2



On Fri, May 30, 2014 at 9:27 PM, <foo7775 at comcast.net> wrote:

> Hey, I think that most of us are familiar with the 'tee' command, which
> allows the user to "split" a single input into two output streams.  I was
> asked yesterday if there was a way to do the same thing with files that are
> being copied,and I had to admit that I had no idea, I'd never considered
> that before.
>
> I thought I'd take just a minute to ask the group if anyone knows of a way
> to copy an arbitrary "file (or group of files, some of which might be
> compiled binaries, etc.)" from a single source to two separate destinations
> simultaneously.  I'd *briefly* considered something like
>
>    "cat sourcefile | tee DEST1 DEST2"
>
> since within *NIX everything's a file, but then figured that compiled
> binaries *might* cause problems.
>
> Not a really big deal if it's not easily possible, but the question kind
> of intrigued me, & I figure I might learn something cool...  ;-)
>
> Thanks guys!
>
> T.
>
> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
>



-- 
Dan Duncan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20140531/e00458d4/attachment.html 


More information about the clue mailing list