From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Scripts not working... HELP!
Date: Thu, 28 Apr 2011 12:21:40 +0200 [thread overview]
Message-ID: <201104281221.41979.wonko@wonkology.org> (raw)
In-Reply-To: <20110428054001.GA3033@waltdnes.org>
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
next prev parent reply other threads:[~2011-04-28 10:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 5:40 [gentoo-user] Scripts not working... HELP! Walter Dnes
2011-04-28 6:11 ` Alexey Mishustin
2011-04-28 6:12 ` Norman Rieß
2011-04-28 10:21 ` Alex Schuster [this message]
2011-04-28 22:16 ` [gentoo-user] [SOLVED] " Walter Dnes
2011-04-29 7:25 ` Norman Rieß
2011-04-29 8:31 ` Mick
2011-04-29 8:41 ` covici
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201104281221.41979.wonko@wonkology.org \
--to=wonko@wonkology.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox