Suppose I have a script READER that goes:
#! /bin/ksh
read line1
echo "$line1 read!"
read line2
echo "$line2 read!"
I could do something from the command line like...
echo "schwifty" | READER
...which would successfully output "schwifty read!" but what if I want to input something for line1 AND line2?
if I could echo schwifty
then echo schwifty2
from the same line and receive the following output:
schwifty read!
schwifty2 read!
...that would be perfect. IS there any way to accomplish this?