Definition for the UNIX term Pipe


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Definition for the UNIX term Pipe
# 1  
Old 04-13-2008
Bug Definition for the UNIX term Pipe

Looking for examples/definition of what the term Pipe means in UNIX. Please provide answers and illustrations if possible or direction. Thanks!Smilie
# 2  
Old 04-13-2008
A pipe is represented by the | character. It uses the output of the command to the left of it as the input to the command on the right of it.

Example: Say you want to look at all of the processes on your box. You'd run:

Code:
ps -eaf

but that's usually a page or more of information, and you want to look at them page-by-page.

Well, the "more" command allows you to look at information page-by-page. We can utilize the pipe to send the output of the "ps -eaf" command into the "more" command and look at all the processes page-by-page. Lookit:

Code:
ps -eaf | more

You can string those things together for a mile if you want. You're not limited to just one pipe on the command line.

What if I wanted to view all the oracle processes? I would execute:

Code:
 ps -eaf | grep oracle

But what if that output was over a page long and I wanted to view them page-by-page. The following command illustrates the ability to have more than one pipe in a single command:

Code:
 ps -eaf | grep oracle | more

# 3  
Old 04-13-2008
Bug Pipe Definition

Matt,

Thanks for your definition and examples. The symbol/character | used to separate a string of UNIX commands is the actual pipe? However, in order for it to be considered a Pipe is more than one command line needed? Smilie
# 4  
Old 04-13-2008
You are correct. The | is a pipe.

Quote:
However, in order for it to be considered a Pipe is more than one command line needed?
Yes. As far as I know, the | character is only used to "pipe" output to another command.
# 5  
Old 04-14-2008
# 6  
Old 04-14-2008
Bug Compromising a UNIX Host

I'm looking for ways that a Unix Host could be compromised by a hacker. Please provide examples. Thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX Pipe -Exit when there are no bytes to read

Hi All, I'm creating a program which reads millions of bytes from the PIPE and do some processing. As the data is more, the idea is to read the pipe parallely. Sun Solaris 8 See the code below: #!/bin/sh MAXTHREAD=30 awk '{print $1}' metadata.csv > nvpipe & while do ... (3 Replies)
Discussion started by: mr_manii
3 Replies

2. Shell Programming and Scripting

Special Characters BASH/UNIX term support

Trying to run this command: find /Volumes/Archive/ -type f -name "Icon" and get /Volumes/Archive//New Business and Marketing/2010 /Creative/Image Library/Stuff for Sean/Cafe Heineken/logo_Café Heineken_03.jpg: No such file or directory due to the accent on the filename. Is there a way around... (2 Replies)
Discussion started by: kostas123334
2 Replies

3. UNIX for Dummies Questions & Answers

What is inside the definition of Unix?

Is FreeBSD and OpenBSD considered Unix? What O.S does Most of the forum members use? How popular are Licensed Unix operating systems for home users? Additionally I thought Linux was a Minux fork and BSD was a Unix fork. Thanks in ... (7 Replies)
Discussion started by: theKbStockpiler
7 Replies

4. Shell Programming and Scripting

Meaning of each term in stty -a in unix

Hi, Can someone help me with the meaning of each term in the below command in unix: stty-aRegds, I have searched google for a lot for this, but didnt get any success in this. Kunwar (2 Replies)
Discussion started by: kunwar
2 Replies

5. UNIX for Advanced & Expert Users

unix command pipe

I am pretty new to UNIX. My client has a requirement where in a directory we have some files with somewhat similar name like test_XX.txt, test_XY.txt, test_XZ.txt, test_ZZ.txt, test_ZY.txt, test_ZX.txt, test_YY.txt......Out of these files few files have 0 bytes. Is there a way where we can go... (7 Replies)
Discussion started by: RubinPat
7 Replies

6. Shell Programming and Scripting

Search term and output term in desired field

Hi All, I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ? ... (28 Replies)
Discussion started by: Raynon
28 Replies

7. Programming

unix pipe in C

I currently stuck on a simple program that requires unix pipe. I'm have never programmed with unix pipe before, so if anyone can point me to the right different will be greatly appreciated! I'm suppose to write a program that the parent spawns many child processes and each of the child process... (1 Reply)
Discussion started by: meh
1 Replies

8. HP-UX

Compress while wrting to a file using a unix pipe

I would like to know if the following can be done. route output from an sql select directly to a pipe and compress it at the same time. regards Albert (2 Replies)
Discussion started by: booyena1
2 Replies

9. UNIX for Dummies Questions & Answers

UNIX Pipe

Hi , I want to understand how the PIPE works in unix . Precisely what I am doing is this . 1. Creating a Named PIPE with the command mknod sqlldr.dat p 2. Directing a file output to the PIPE file in the background cat abc > sqlldr.dat 3.SQL Loader in oracle is... (5 Replies)
Discussion started by: akrathi
5 Replies

10. Programming

Create a Term & Run chars on this Term

hi floks ! i'd like to know how can i transmete a character or a string from my source code to a term and make it interpret or un by the shell wich is running in my term. I'd like to create a Term from my code (and get its file descriptor) and then transmete each char typed on the keyboard to... (1 Reply)
Discussion started by: the_tical
1 Replies
Login or Register to Ask a Question