ข้ามไปยังเนื้อหา

Pipes — joining commands

ความคิดหลัก: ท่อ (Pipes)

  • This is what makes the shell powerful. A pipe | sends one command's output straight into the next command:
cat fruits.txt | sort
  • cat สร้างบรรทัด; sort รับและจัดเรียงให้เป็นระเบียบ ไม่มีไฟล์คั่นกลาง

ท่อส่งเอาผลลัพธ์จากคำสั่งหนึ่งไปใส่ในคำสั่งถัดไป: cat | sort | uniq

เข้าสู่ระบบหรือสร้างบัญชี

IGCSE, A-Level & AP