say i have a function of this nature in my .bash_profile
sayword(){
echo $1
}
now the command will be run like sayword hello
now i want the function to be able to take input from other command using unix pipe. something like cat words.txt | sayword
and it outputs each of the word in words.txt. How do i do that ?. I read a question here that talks about redirecting to dev/null but that doesn't seem to work .