Sorry for posting it here, but Google does a very bad job when searching for symbols.
What does the "|" mean in:
"some string" | someexecutable.py
It is the pipe symbol. It separates two programs on a command line (see Pipelines
in the bash
manual), and the standard output of the first program (on the LHS of the pipe) is connected to the standard input of the second program (on the RHS of the pipe).
For example:
who | wc -l
gives you a count of the number of people or sessions connected to your computer (plus one for the header line from who
). To discount the header line:
who | sed 1d | wc -l
The input to sed
comes from who
, and the output of sed
goes to wc
.
The underlying system call is pipe(2)
used in conjunction with fork()
, dup2()
and the exec*()
system calls.
It's called pipe
. It gives the stdout of the first command ("some string"
) as the stdin to the second command (someexecutable.py
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With