I'm a beginner writing Bash scripts so I'm confused on the architecture of pipes. For the basic commands such as grep
for example, did pipes have to be somehow configured and programmed to be allowed into the command? Or do pipes just automatically pass in the outputs as the first argument to whatever is being piped to?
My main question is say I have a script that takes in text as the first argument using something like my_script.sh text_file
. Would pipes work automatically if I were to do echo Hello | my_script.sh
or would I have to follow some interface to allow pipes.