Shell Data Processing - Standard Input Stream (Stdin) operations that applied only to the bash|bash shell
The input redirection operator takes the content of a file and send it as standard input
Example with read that take a stand
read -p "Type Something: " myVar
echo "You answer was :" $myVar
read -p "Type still Something: " myVar
echo "Your second answer was :" $myVar
echo $'Hello\nWorld' > myAnswer.txt
./myScript.sh < myAnswer.txt
You answer was : Hello
Your second answer was : World
The input redirection operator «< takes a string and send it as standard input
Example with read that take a stand
read -p "you name: " name <<< "Nico"
echo $name
Nico
Example for an Here document (a input document in the code) with tr and an output redirection.
tr a-z A-Z << END_TEXT > myText.file
one two three
four five six
END_TEXT
ONE TWO THREE
FOUR FIVE SIX