Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!columbia!caip!brl-adm!brl-smoke!smoke!HELLER%cs.umass.edu@CSNET-RELAY.arpa From: HELLER%cs.umass.edu@CSNET-RELAY.arpa Newsgroups: net.unix Subject: C Shell question Message-ID: <2264@brl-smoke.ARPA> Date: Tue, 15-Jul-86 15:48:15 EDT Article-I.D.: brl-smok.2264 Posted: Tue Jul 15 15:48:15 1986 Date-Received: Wed, 16-Jul-86 03:43:43 EDT Sender: news@brl-smoke.ARPA Lines: 54 I am a very experenced VAX/VMS user, just starting to use UNIX on a SUN 3. The SUN is running BSD 4.2 Release 3.0. I am running under the C Shell (/bin/csh). I am trying to setup my UNIX envirement in a way simular to the one I have evolved on the VAXen under VMS. I have a large number of sub[-sub...]-directories on three different physical disks under VMS. In many of these directories I have a LOGIN.COM file which sets up various logical names (envirement variables) and symbols (aliases) peculiar to the directory the LOGIN.COM resides in. I have a simple DCL procedure file which I use to change my default directory and run the LOGIN.COM in the new directory if it exists: $ set def 'p1' $ l=f$search("login.com") $ if l .eqs. "" then goto no_login $ @login 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' $no_login: I would like to do the same under UNIX. I created a shell script like this: (the file name is /usr/vision/heller/procs/sw.source) cd $1 if (-e .login) then source .login endif but it does not work. When I do this: % alias sw source /usr/vision/heller/procs/sw.source % pwd /usr/vision/heller % sw procs Terminal type is sun % pwd /usr/vision/heller it just sets my default directory to my home directory and runs my main .login file. When I do this: % alias sw csh /usr/vision/heller/procs/sw.source % pwd /usr/vision/heller % sw procs % pwd /usr/vision/heller it works, except it is done in a sub-process and my main process is not affected. Robert Heller Heller@UMass-CS.CSNet PS: Please reply to me directly. I am not on INFO-UNIX. RPH