SUMMARY: .cshrc variables

From: David Pentland (dave@computer-studies.napier.ac.uk)
Date: Tue Mar 05 1991 - 13:53:53 CST


        OK. Thank you for all your responses. I got over 90! (serves
        me right for asking such a simple question I supose!).

        The simple answer to my query about getting csh values back to
        the calling shell is to invoke them using 'source' or 'eval'.

        As to the question of setting up users environments depending on
        their specific requirements, there were many varied responses, but
        they basically fell into 4 categories:

        1) Create system .cshrc and .login files for all users, and put
        them in a globally accessable directory. Users local .cshrc and
        .login files source these in their first line, which
        has a comment saying something like "DO NOT REMOVE THIS LINE".
        Users may then override default or create new settings themselves.

        For us, this would mean every user would be set up more or less
        the same, which we do not want.

        2) Similar to 1), but each package or environment type has it's own
        individual .cshrc file. As users need specific packages, aliases, etc
        they add an appropriate source line to their own .cshrc files.

        3) Add the following line to users .cshrc files:

                alias setup 'eval `/usr/local/bin/setup \!*`'

        Then, from their .cshrc files or shell prompt, users can type

                setup ada framemaker

        The administrator then has to write an appropriate setup program.

        4) Users add setenv statements to their own .cshrc files such as:

                setenv ADD_ADA true
                setenv ADD_PROLOG true
                setenv ADD_X false

        and then

                source /usr/local/...../setup_script

        The setup_script would interrogate the environmental variable values,
        and add appropriate paths, setenvs, etc.

        I think I will try a combination of 1) and 4). Have a general system
        .cshrc style script for everyone, and also check for local setenvs.
        Users add setenv statments for specific packages (they couldn't get
        *that* wrong; could they?).

        Thanks again. David Pentland - Napier Polytechnic, Edinburgh.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:11 CDT