tags:

views:

70

answers:

1

I have a bashscript that spawns processes on two different machines over ssh and then cat's the output of one into a text file. How can I have the output ALSO displayed in the terminal as it's running?

+4  A: 

Look at the tee utility (man tee).

Tim Yates
And to do this with `tee` you issue the simplest possible command `cat output|tee filename`
Kimvais
Worked brilliantly, thanks
piggles
Harvey
what?... Could you explain that line a little? I'm a bit of a hacker when it comes to bash :-p
piggles
Harvey