[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash profile how?



Bob Proulx said:
> I think you have hit the nail squarely on the head.  How do you make
> it work for all possible shells?  I believe that to be the crux of the
> issue.  Anything that is done is wrong for one shell or another.

Well the exec -l $SHELL -c "$STARTUP" solution fixes that provided /bin/sh
exec accepts the option like bash. To make it work with other shells would
not be hard as the -l option to exec just sets the zero'th argument of the
command to '-' which appears to be a convention shared with ash at least.
>From the ash man page:

  If the first character of argument zero to  the  shell  is
  ``-'',  the  shell is assumed to be a login shell, and the
  files /etc/profile and .profile are read  if  they  exist.

Mike



Reply to: