From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1984 invoked from network); 4 Aug 1998 23:07:24 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Aug 1998 23:07:24 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id TAA19497; Tue, 4 Aug 1998 19:01:17 -0400 (EDT) Resent-Date: Tue, 4 Aug 1998 18:43:42 -0400 (EDT) Message-ID: <19980805004735.48027@picard.franken.de> Date: Wed, 5 Aug 1998 00:47:35 +0200 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: zsh-users@math.gatech.edu Subject: Re: compctl - using hostnames with rlogin, rsh, and ssh Mail-Followup-To: zsh-users@math.gatech.edu References: <19980730230755.B6503@math.fu-berlin.de> <19980804173325.K9765@math.fu-berlin.de> <13767.22210.350181.384719@knecht> <19980804211110.A22898@math.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Mailer: Mutt 0.89i In-Reply-To: <19980804211110.A22898@math.fu-berlin.de>; from Sven Guckes on Tue, Aug 04, 1998 at 09:11:10PM +0200 X-Disclaimer: Linux rulez X-Operating-System: Linux picard 2.0.32 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by math.gatech.edu id SAA19273 Resent-Message-ID: <"vCwr_3.0.Kj4.Twunr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1704 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Tue, Aug 04, 1998 at 09:11:10PM +0200, Sven Guckes wrote: > > if [[ -f ~/.zshhosts ]]; then > > # read in host list from ~/.zshhosts > > hosts=$(< ~/.zshhosts) > > Quoting Roland Jesse (jesse@prinz-atm.cs.Uni-Magdeburg.DE): > > Does it matter whether the hostnames in ~/.zshhosts are > > all stored in one big line or in one line per host name? > > Well, my ~/.zshhosts has one hostname per line. > Dunno whether it'll work with all hosts on one line. > Oh, heck, I'll give it a try: > > :%j > :w > :shell > $ ssh > $ ssh erdos\ euler\ gauss\ leibniz\ pascal\ > > Nope, doesn't seem to work. Not this way, no. You did a hosts=$(< ~/.zshhosts) which doesn't work because all is in a variable. Try an array instead: hosts=($(< ~/.zshhosts)) This will work whether or not all hosts are in one line or there is one hostname per line. ~> shosts=($(< sshhosts)) ~> compctl -k shosts ssh ~> ssh a ~> ssh automatix.informatik.uni-wuerzburg.de ~> rhosts=($(< rshhosts)) ~> compctl -k rhosts rsh ~> rsh a ~> rsh automatix.informatik.uni-wuerzburg.de ~> < sshhosts automatix.informatik.uni-wuerzburg.de datenbus.mayn.de picard.franken.de willkuere.informatik.uni-wuerzburg.de ~> < rshhosts automatix.informatik.uni-wuerzburg.de datenbus.mayn.de picard.franken.de willkuere.informatik.uni-wuerzburg.de ~> > Sven ['u', ":w" ;-)] CU, Thomas -- Thomas Köhler Email: jean-luc@picard.franken.de <>< WWW: http://home.pages.de/~jeanluc/ IRC: jeanluc LCARS --- Linux for Computers on All Real Starships