Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (1) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought



currentsb(1)        UNIX Programmer's Manual         currentsb(1)



NAME
     currentsb - lists the current sandbox and set environments

SYNOPSIS
     currentsb
              [-sb -set -dir -setdir -back] [-all] [-rc rcfile]

FLAGS
     -sb  Prints out the current sandbox.  If no options are
          given, the current sandbox and current set are printed
          out by default.

     -set Prints out the current set.  If no options are given,
          the current sandbox and current set are printed out by
          default.

     -dir Prints out the base directory for the current sandbox.

     -setdir
          Prints out the default set directory for the current
          sandbox.

     -back
          Prints out the backing tree for the current sandbox.

     -all Prints out all the information in this order: sandbox
          set sandbox-dir set-dir backing-tree.

     -rc rcfile
          By default, currentsb uses $HOME/.sandboxrc to deter-
          mine the current sandbox.  If this option is given, it
          will use the user's rc file specified.

DESCRIPTION
     By default, currentsb lists the current sandbox and the
     current set.  It returns the string "--EMPTY --EMPTY" if it
     cannot find the current sandbox and the string "sbname --
     EMPTY" if it cannot find the current set.  Otherwise its
     output is of the form "sbname setname " with a single space
     in between each word and one at the end.

     The current sandbox is determined by the environment vari-
     able SANDBOX first then by the default sandbox listed in the
     user's rc file which defaults to $HOME/.sandboxrc. The
     current set is determined by the environment variable BCSSET
     first then by the default set in the sandbox's rc_files/sets
     rc file.

     The other options for currentsb print out other information
     about the current environment.  If two or more pieces of
     information are requested, the information is always printed
     in the following order: sandbox set sandbox-dir set-dir



Printed 1/23/91              5/31/90                            1





currentsb(1)        UNIX Programmer's Manual         currentsb(1)



     backing-tree.

EXAMPLES
     currentsb can be use as a command to indicate the current
     state, and it can be used in a start up file, such as
     .cshrc, to automatically setup the environment.  An example
     of its use in a .cshrc to set the environment and path is:

       if ( ! $?SANDBOX ) then         # get SANDBOX if not set already
         setenv SANDBOX `currentsb -sb`

         if ( "$SANDBOX" == "--EMPTY" ) then       # no default SANDBOX
           unsetenv SANDBOX
         endif
       endif

       if ( $?SANDBOX )
         if ( $?BCSSET ) then
           setenv BCSSET `currentsb -set`

         if ( "$BCSSET" == "--EMPTY" ) then         # no default BCSSET
           unsetenv BCSSET
         endif

                     # if there is a SANDBOX put its path first
         setenv PATH /project/osc/sandboxes/suzieq/${SANDBOX}\
                     /link/tools/pmax/bin:$PATH
       endif


FILES
     ${HOME}/.sandboxrc
          rc file that specifies existing sandboxes and the
          default sandbox

     /sandbox/rc_files/sets
          list of valid sets in each sandbox


EXIT VALUES
     currentsb returns '0' if okay; -1 if error.


RELATED INFORMATION
     sbinfo(1)










Printed 1/23/91              5/31/90                            2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026