Bash Pipe
A pipe (|) sends the output of one command as input to the next command.
You can chain many commands this way, each one working on the result of the one before.
Sort the output of a command
printf "banana\napple\ncherry\n" | sort
apple
banana
cherry
Chain three commands
Count the lines in fruits.txt that contain "an":
cat fruits.txt
banana
apple
cherry
mango
cat fruits.txt | grep "an" | wc -l
2