Problem in sh - while and rsh

From: David R Courtade <drc_at_amherst.com>
Date: Thu, 27 Jun 1996 09:33:27 -0400 (EDT)

Good Morning (here),

I have a bit of a problem with DU 3.2c, and 3.0. I have a shell script
which reads a file and then does an rsh ( it's used for dumps, if you
care). I read the file in a while loop. The loop works fine without the
rsh, but if there is an rsh in the while loop the next read is null.
Anybody have any clue if I'm doing something wrong: I'll include an
example of the script, and the file read:

SCRIPT
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
BFILE=./taboo
ii=0
exec < $BFILE
read flsm
while [ -n "$flsm" ]
do
       ii=`expr $ii + 1`
       echo $ii
       case "$ii" in
          1)
             $flsm
          ;;

          *)
             $flsm
             echo dev,"hi Dave"
          ;;
       esac
read flsm
echo $flsm
done
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

FILE READ
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo "Hi here"
rsh node1 echo "hi node1"
rsh node1 echo "hi node1"

In this case I get the "Hi here and "hi node1" messages. If I remove the
rsh, I get all messages.

HELP Please,
==============================================================================
David R. Courtade
System Administrator
Amherst Systems Inc.
30 Wilson Rd.
Buffalo, N.Y. 14221
Phone: (716)631-0610
FAX: (716)631-0629
Email: drc_at_amherst.com
Received on Thu Jun 27 1996 - 16:07:47 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT