Piping allows the standard output from one program to be fed directly into the standard input of another without the need for a temporary file:
$ program1 | program2
The | character is known as the pipe character and so this process is known as piping.
Here's an example of piping the output from find . (which recursively prints the paths of the files and directores in the current directory) into the grep program to find just a particular file:
find . | grep "The file I'm after.txt"
Data from the first program is piped into the second program line by line so the first program doesn't have to finsih before the second program can start using it.
$ program1 | program2
The | character is known as the pipe character and so this process is known as piping.
Here's an example of piping the output from find . (which recursively prints the paths of the files and directores in the current directory) into the grep program to find just a particular file:
find . | grep "The file I'm after.txt"
Data from the first program is piped into the second program line by line so the first program doesn't have to finsih before the second program can start using it.
Comments
Post a Comment
https://gengwg.blogspot.com/