Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ptsfa!ihnp4!inuxc!pur-ee!uiucdcs!bradley!ninja From: ninja@bradley.UUCP Newsgroups: comp.unix.questions Subject: Re: variables and shells Message-ID: <10800003@bradley> Date: Thu, 2-Apr-87 03:01:00 EST Article-I.D.: bradley.10800003 Posted: Thu Apr 2 03:01:00 1987 Date-Received: Sun, 5-Apr-87 02:39:12 EST References: <1194@ethos.UUCP> Lines: 20 Nf-ID: #R:ethos.UUCP:1194:bradley:10800003:000:743 Nf-From: bradley.UUCP!ninja Apr 2 02:01:00 1987 You can't pass values of shell variables back to parent shells, but you can redirect the input of your shell to a shell script that changes the value of a variable. This is the "." command, and I think it's documented in the SH(1) manual page. It works something like this : $TERM=dumb; export TERM $ . reset /* reset is a shell script that contains TERM=a980 */ $echo $TERM a980 Note that reset could contain any shell commands to change whatever you wanted. I'm pretty sure (but not positive) that this is how getty runs your .profile. A good use for this is to run a script that recovers your terminal after a bad exit from curses. Many uses. And for CSH users the analogous command is "source". Frank McGee ihnp4!bradley!ninja