Why 'script' utility require SHELL (and work fine under Linux)?

Cyrille Lefevre cyrille.lefevre-lists@laposte.net
Fri Nov 4 05:04:00 GMT 2011


Le 14/10/2011 11:43, Oleksandr Gavenko a écrit :
> Look to my session:

well, you session isn't very clear, however...

> As you can see first time script does not use SHELL, second time use it
> and third tie use it.
>
> So SHELL env var does not exported by bash...

well, shells doesn't export anything except variables already
exported at shell invocation or using the export builtin.

 > Why?

so, under unix like, $SHELL is positionned by login or whatever
process (sshd, telnetd, X gui, etc.) which launch the interactive
shell.
under cygwqin, $SHELL is well positionned when connected through the 
network (sshd) but not when launched by cygwin.bat.

> Is this right add
>
> export SHELL
>
> to '~/.bashrc'?

.bash_profile is more appropriate.

the base-file maintainer has been BCC'ed to add the export SHELL to the 
/etc/profile.

Regards,

Cyrille Lefevre
-- 
mailto:Cyrille.Lefevre-lists@laposte.net


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list