public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Willie Wong <wwong@math.princeton.edu>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] crontab not executing
Date: Mon, 20 Jun 2011 09:52:10 -0400	[thread overview]
Message-ID: <20110620135210.GB11112@math.princeton.edu> (raw)
In-Reply-To: <BANLkTi=J6xpQ9_xg3rGFBwtgTzMRX5FbWQ@mail.gmail.com>

On Mon, Jun 20, 2011 at 08:39:00PM +1000, Adam Carter wrote:
> >> /bin/sh is a symlink to bash.
> >
> > Which runs as sh when run from the symlink.
> 
> I dont understand. "runs as" usually means "runs under the user
> context" to me - are you saying bash has an sh compatibility mode?


Yes, from the bash man page:

       If  bash  is  invoked  with  the name sh, it tries to mimic the startup
       behavior of historical versions of sh as  closely  as possible,  while
       conforming  to the POSIX standard as well.  When invoked as an interac‐
       tive login shell, or a non-interactive shell with the  --login option,
       it  first  attempts  to read and execute commands from /etc/profile and
       ~/.profile, in that order.  The  --noprofile  option  may  be used  to
       inhibit  this  behavior.  When invoked as an interactive shell with the
       name sh, bash looks for the variable ENV, expands its value  if it  is
       defined,  and uses the expanded value as the name of a file to read and
       execute.  Since a shell invoked as sh does not attempt to read and exe‐
       cute  commands from any other startup files, the --rcfile option has no
       effect.  A non-interactive shell invoked with  the  name  sh  does  not
       attempt  to  read  any  other  startup files.  When invoked as sh, bash
       enters posix mode after the startup files are read.

W
-- 
Willie W. Wong                                     wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
         et vice versa   ~~~  I. Newton



  parent reply	other threads:[~2011-06-20 14:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-19 22:37 [gentoo-user] crontab not executing Grant
2011-06-19 23:45 ` David W Noon
2011-06-20  5:18 ` Florian Philipp
2011-06-20  6:30   ` Adam Carter
2011-06-20  8:21     ` Neil Bothwick
2011-06-20  9:07       ` Florian Philipp
2011-06-20 10:39       ` Adam Carter
2011-06-20 11:22         ` Albert Hopkins
2011-06-20 11:30         ` Neil Bothwick
2011-06-20 11:53         ` Florian Philipp
2011-06-20 13:52         ` Willie Wong [this message]
2011-06-20 12:52 ` Todd Goodman
     [not found] ` <1426203.rtguKxDEjI@nazgul>
2011-06-20 14:47   ` Grant
2011-06-20 14:57     ` Peter Humphrey
2011-06-22 14:40       ` Grant

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=20110620135210.GB11112@math.princeton.edu \
    --to=wwong@math.princeton.edu \
    --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