[comp.unix.questions] csh and $SHELL variable conflicts.

joel@intelisc.UUCP (Joel Clark) (02/04/88)

I have ATT's Sys V/386 R3.0 V1.0 on an intel 80386 PC/AT bus type
machine.

We aquired a copy of csh through intel's Berkeley source license.
OTHERSH was set to /bin/sh before compiling it.
Shell scripts written with '#' as the first character are run by
/bin/sh EXCEPT when executed from a makefile.   make reads the
script and feeds it to the shell defined by $SHELL.

Is there a convention for shell and environment variables to define
the interactive shell and the batch shell differently?

Currently I `set shell=/bin/csh` and `setenv SHELL /bin/sh`

However in an attempt to emulate BSD job control I was investigating
`shl`  the SYS V shell layer facility and found it creates virtual
terminals running the shell defined in $SHELL.

This does note sweetly and cleanly allow me to provide our customers
with a csh environment with "job control" in a System V system.  Suggestions?

Joel Clark			            
Intel Scientific Computers		      
503-628-7732				     
joel@isc.intel.com			   
{tektronix}!ogcvax!intelisc!joel	

kimcm@ambush.UUCP (Kim Chr. Madsen) (02/10/88)

joel@intelisc.UUCP (Joel Clark) writes:

>I have ATT's Sys V/386 R3.0 V1.0 on an intel 80386 PC/AT bus type
>machine.

>We aquired a copy of csh through intel's Berkeley source license.
>OTHERSH was set to /bin/sh before compiling it.
>Shell scripts written with '#' as the first character are run by
>/bin/sh EXCEPT when executed from a makefile.   make reads the
>script and feeds it to the shell defined by $SHELL.

All shell scripts are run by the /bin/sh, except make which runs the
scripts by the $SHELL - unless you define the variable SHELL inside
the makefile - do a 

SHELL= /bin/sh

and all scripts are run by the SHELL variable defined in the makefile.






					Best Regards
					Kim Chr. Madsen.