From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QFOO3-0003UE-LV for garchives@archives.gentoo.org; Thu, 28 Apr 2011 10:23:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 362DE1C027; Thu, 28 Apr 2011 10:21:44 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [94.23.166.77]) by pigeon.gentoo.org (Postfix) with ESMTP id BA7F41C027 for ; Thu, 28 Apr 2011 10:21:44 +0000 (UTC) Received: from weird.localnet (p5B2753EB.dip.t-dialin.net [91.39.83.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx.virtyou.com (Postfix) with ESMTPSA id 64D2E4A82AE for ; Thu, 28 Apr 2011 12:21:43 +0200 (CEST) From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Scripts not working... HELP! Date: Thu, 28 Apr 2011 12:21:40 +0200 User-Agent: KMail/1.13.7 (Linux/2.6.38-ck_edid; KDE/4.6.2; x86_64; ; ) References: <20110428054001.GA3033@waltdnes.org> In-Reply-To: <20110428054001.GA3033@waltdnes.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104281221.41979.wonko@wonkology.org> X-Archives-Salt: X-Archives-Hash: 25c6c62e89580f1d929707b5576572a0 Walter Dnes writes: > This message is coming from my 32-bit "hot backup" gentoo machine. > For some reason, any script that I call on my 64-bit machine immediately > returns to the command prompt. No warnings or error messages or > diagnostics. Builtins and compiled executables work OK. For instance, > if I have a script named "xyz" that goes like so... > > #!/bin/bash > man bash > > ..., executing "xyz" or "~/bin/xyz" results in bash immediately > returning to to the command prompt. Weeeeird. I have no idea. The usual guess is that a partition is mounted noexec, but that would give an error. Or that the script is saved in DOS format, with CR-LF instead of LF endings, but that would throw a 'bad interpeter' error. Try 'strace ~/bin/xyz' (emerge strace if you don't have it) and compare the output with your working machine, that should give some hints to what is happening. What happens if you change the script to this? #!/usr/bin/man bash Oh, now I _do_ have an idea. What about startup files, like .bashrc, .bash_profile and such? Any recent chanegs here? Try: #!/bin/bash -i This forces the shell to be interactive, so it sources other startup files. Add 'xv' (bash -ixv) to let bash output which lines are being executed. Also put some debug info in .bashrc, .bash_profile, /etc/bash/bashrc, /etc/profile to see what of them is being started. And try another user without your personal startup files. Same effect? Wonko