bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'while read' loop ends


From: Zsiros Zsolt
Subject: 'while read' loop ends
Date: Mon, 09 Aug 2004 13:31:42 +0200

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu'
-DCONF_MACHTYPE='i386-redhat-linux-gnu'         -DCONF_VENDOR='redhat'
-DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib -D_GNU_SOURCE  -O2
-g -pipe -march=i386 -mcpu=i6        86
uname output: Linux ubul 2.4.20-20.9 #1 Mon Aug 18 11:45:58 EDT 2003
i686 i686 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
I have a simple loop which parses a parameterfile and does some remote
ssh commands:

Repeat-By:
         file test.par:
         host1
         host2
         host3
 
         file test.sh:
         #!/bin/bash
         while read -r remhost
         do
           ssh $remhost "uname -a"
           echo $remhost
         done <$1
 
        $ ./test.sh test.par
        Displays only "uname -a" and hostname of host1 in parameterfile.
        If I comment out the ssh command the loop ends normally. (echoes
        all the hosts)
        My ssh version is 3.5p1
        This script runs fine on HPUX's /bin/sh.

Fix:






reply via email to

[Prev in Thread] Current Thread [Next in Thread]