What is the difference between pipe (|) and tee command in unix
Answers were Sorted based on User's Feedback
Answer / rajib mallick
PIPE- "|" :- **. It is an IPC(Inter Process Communication).
*. It means that the out put of the first command is the
Input of the second command.
**. Like wise 3rd, 4th, 5th.....nth.
tee :- **. tee generates two outputs always.
**. It's a filter ! by using tee we can send the output to
a new file at the same moment we can see the output on the
screen.
..for any query you can e-mail me on "rajib.ku@gmail.com".
Is This Answer Correct ? | 46 Yes | 0 No |
Answer / jaydeep das
pipe is used to direct the output of a set of commands to
another set of commands meaning output of one will be fed
as input to the other
tee is used to display the output on the screen
Is This Answer Correct ? | 51 Yes | 21 No |
Answer / ruth suganya sebastian
pipe is used to execute two or more commands
eg:select ename||'works as '||job from emp;
tee is used to create an empty file,stores the output and
then displays the contents on the screen
eg: grep "^d" filename||tee file
Is This Answer Correct ? | 49 Yes | 22 No |
Answer / manikantan t s
'|' --> This will take output and send it as the input for
next command
tee --> tee will generate two outputs
Is This Answer Correct ? | 32 Yes | 7 No |
Answer / sourisengupta
pipe: pipe is used to redirect the output to theinput of an
another command.
tee: tee is used to prodiuced two output and you can
redirect it anywhere you want;.
Is This Answer Correct ? | 11 Yes | 5 No |
Answer / madhusudhan
pipe: pipe is used to redirect the output to the input of an
another command.
to see oracle processes.
ps -ef | grep SIDNAME
Here grep will find the sidname and the output of grep will be used as input to display processes.
tee : using tee we can send the output to
a new file at the same time we can see the output on the
screen
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / worsame abid
A Pipe is two or more commands seperated by pipe chat "|".
That tells the shell to arrange for the output of the
proceeding command to be passed as input to the following
example.
$ls |wc -l
this will mean that output of ls command will serve as
input for wc command as result we will get total number of
files in current directory.
Tee is normally used to split the output of a program so
that it can be seen on the display and also be saved in a
file ,The tee command reads standard input, then writes its
content to standard output and simultaneously copies it
into the specified file(s) or variables.
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / nagarjuna reddy
PIPE(|)
command is used send the output of one command as a input for another command
tee
command is used to write the same data to the multiple files
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / thina
ls |wc-l |tee 1.txt
step 1: listing of file and folders
step 2: counting No of Lines
step 3: tee command getting output from above steps and
stres in the file
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / manoj
Pipe command.
syntax :$command1|command2
Command1 output will be the input for command2
Eg:command1:echo$s
command2:wc
echo$s|wc
s=manoj is input of command1
Output for command2 is manoj
input of command 2 is manoj
output of pipe command is 5
Output:5
Is This Answer Correct ? | 0 Yes | 0 No |
What is sed awk grep?
If JFS file system is 100% full how we can increase the file system ?
Where LOG fiels resides in AIX and pls tel me how to remove the log file
Why we are using UNIX OS when we are doing the testing in our application?
Name the various commands that are used for the user information in unix.
How do you grep a case insensitive?
What is clustering in HP and how it's work?
Which command is used to create a directory?
What are the general commands in using unix os for a beginner?
What is the difference between cat and more command?
what is the advaantage of each user having its own copy of the shell?
Explain iostat, vmstat and netstat.