Two test scripts as below:
$cat echo_test1.sh
#!/bin/sh
count=0
while true
do
echo "Test count: $count"
count=`expr $count + 1`
sleep 2
done
Second script which receive data from first script continuously:
$cat echo_test2.sh
#!/bin/sh
while read $1
do
echo "Test 2: $1"
sleep 2
done
and run it like this:
$./echo_test1.sh | ./echo_test2.sh
test1 script echo continuously and test2 receive it and echo again with some addition to received message.
what are the ways possible to achieve this function.