From owner-freebsd-questions Wed Mar 29 14:33:33 2000 Delivered-To: freebsd-questions@freebsd.org Received: from news-ma.rhein-neckar.de (news-ma.rhein-neckar.de [193.197.90.3]) by hub.freebsd.org (Postfix) with ESMTP id 8B97037B58E for ; Wed, 29 Mar 2000 14:32:58 -0800 (PST) (envelope-from daemon@bigeye.rhein-neckar.de) Received: from bigeye.rhein-neckar.de (uucp@localhost) by news-ma.rhein-neckar.de (8.8.8/8.8.8) with bsmtp id AAA12955 for freebsd-questions@freebsd.org; Thu, 30 Mar 2000 00:32:56 +0200 (CEST) (envelope-from daemon@bigeye.rhein-neckar.de) Received: (from daemon@localhost) by bigeye.rhein-neckar.de (8.9.3/8.9.3) id AAA59303 for freebsd-questions@freebsd.org; Thu, 30 Mar 2000 00:21:37 +0200 (CEST) (envelope-from daemon) From: naddy@mips.rhein-neckar.de (Christian Weisgerber) Subject: Re: bash & rcp question Date: 30 Mar 2000 00:21:37 +0200 Message-ID: <8btvlh$1psr$1@bigeye.rhein-neckar.de> References: <10003290917.aa14533@ccstores.com> To: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jim Pazarena wrote: > This is on FreeBSD 3.4 on both machines. The user can rlogin back > and forth between both machines without requiring passwords. > > The command issued is: > rcp /u/wrappers/hosts.blacklist machinea:/u/wrappers > > and the failing error message is: > bash: [: =: unary operator expected > > can someone interpret this error message in the context above (please)? The user on machina has bash as login shell. Due to the way rcp works, it spawns a shell on machinea using rsh, and if that shell is bash, it detects that it is called from rsh and as a special case executes ~/.bashrc despite not running interactively. (This is a documented, albeit somewhat idiosyncratic behavior.) Anyway, the user has something in his ~/.bashrc that doesn't work when the shell doesn't run interactively. Since it's the '[' command that complains above, the error is probably in an "if [ ... ]" construct. -- Christian "naddy" Weisgerber naddy@mips.rhein-neckar.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message