Skip to content · ⁨Bỏ qua nội dung⁩

Pipes — joining commands · ⁨Pipes — nối các lệnh⁩

English

The big idea: pipes

  • This is what makes the shell powerful. A pipe | sends one command's output straight into the next command:
  • cat produces the lines; sort receives them and puts them in order. No file in between.

Tiếng Việt

Ý tưởng cốt lõi: đường ống (pipes)

  • Đây chính là thứ khiến shell trở nên mạnh mẽ. Một đường ống | gửi trực tiếp kết quả của một lệnh vào lệnh tiếp theo:
cat fruits.txt | sort
  • cat sinh ra các dòng; sort nhận chúng và sắp xếp theo thứ tự. Không có file trung gian nào.

Một đường ống gửi trực tiếp kết quả của một lệnh vào lệnh tiếp theo: cat | sort | uniq

Log in or create account · ⁨Đăng nhập hoặc tạo tài khoản⁩

IGCSE, A-Level & AP