|
A|B 형태로 사용하는데, 이말은 A 커맨드의 표준 출력을 B 커맨드의 표준 입력으로 사용한다는 의미
리다이렉션이 프로세스의 입력 또는 출력을 파일로 사용하는 것이라면 pipe는 서로다른 프로세스간 작동하는 방식
try - catch
which ansible || { true # put your code to install ansible here }
if ! which ansible; then true # put your code to install ansible here fi
Pipe Structure
How fast are Linux pipes anyway?
In this post, we will explore how Unix pipes are implemented in Linux by iteratively optimizing a test program that writes and reads data through a pipe. We will begin with a simple program with a throughput of around 3.5GiB/s, and improve its performance twentyfold.
https://mazzo.li/posts/fast-pipes.html

Pipe Usage
What does the linux pipe symbol "|" do?
Asked This question already has answers here: Closed 6 years ago. Here is a command that sorts files in a folder in reverse order ls | sort -r What does the | symbol in that command do? What I'm really looking for here is high level (easy to understand) explanation of pipes for Linux beginners.
https://superuser.com/questions/756158/what-does-the-linux-pipe-symbol-do

Seong-lae Cho