Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!princeton!phoenix.Princeton.EDU!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul Falstad) Newsgroups: comp.unix.questions Subject: Re: How can shell scripts be shared by different shells? Message-ID: <7972@idunno.Princeton.EDU> Date: 6 Apr 91 18:35:11 GMT References: <4805@syma.sussex.ac.uk> Sender: news@idunno.Princeton.EDU Organization: League For Fighting Chartered Accountancy Lines: 22 andy@syma.sussex.ac.uk (Andy Clews) wrote: >Does anyone know of any clever kludges that can be made to this central >shellfile, which could allow Ksh or Csh to be able to source it? I thought >of putting a test at the top, but of course tests are different in Csh >and Ksh..... Do something like this: export PATH && . kshscript && exit source cshscript Then create two files named 'kshscript' and 'cshscript' with appropriate commands in each. Or, just include the csh commands after the 'export' line. Why can't you just have two separate shellfiles, one for csh users and one for ksh users, and just have each person source/. the appropriate file? -- Paul Falstad, pfalstad@phoenix.princeton.edu | 10 PRINT "PRINCETON CS" [Your blood pressure just went up.] | 20 GOTO 10 Princeton University would like to apologize to everyone for this article.