Wednesday, February 24, 2010

How to redirect the Shell Program output to file and Screen in Unix

Tee Unix Command to redirect the shell output to file and Screen

The tee utility will copy standard input to standard output, making a copy in zero or more files.
For more information "man tee"
Sample
#!/bin/sh
test="welcome to the world of linux"
echo $test | test Sample.txt // Here output will be redirected to Screen and Sample.txt
Enroll your comments if you find it is useful.

0 comments:

Post a Comment

Categories

Blog Archive

  © Blogger template Webnolia by Ourblogtemplates.com 2009

Back to TOP