• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 809
  • Last Modified:

pipeline in linux script

hi,

just  have a question.

what does pipe line also known as  | do in linux script

I only know it passes to otherside? not quite sure..

thank you for your help
0
bt1942
Asked:
bt1942
1 Solution
 
woolmilkporcCommented:
The pipe reads the standard output ("stdout") created by the program/script on its left side and passes it unchanged to the program/script on it's right side. This "right" program must be set up to read the data from standard input ("stdin").

Try

echo "Hello World!" |cat

"echo" writes the given string to stdout. The pipe reads this output and passes it to stdin of cat. "cat", when invoked without parameter, just reads stdin and writes the output to stdout, which is by default your terminal.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now