#!/bin/bash # echo -e "hello\nworld" | ./show-pipe #first reply: hello #second reply: world # echo "hello nworld" | ./show-pipe #first reply: hello world #second reply: read VAR=$REPLY echo "first reply: "$REPLY"" #VAR=$REPLY #echo $VAR echo "Number of ARGS: $#" OTHER=$1 echo $OTHER read echo "second reply: "$REPLY"" exit 0