SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Vol 2

SYSTEM SWITCHES

Name:
    SYSTEM SWITCHES (SET)
Type:
    Set Subcommand
Purpose:
    Probe for values pertaining to certain operating system values.
Description:
    Dataplot extracts the values of several operating system environment variables. These values can be obtained by the user using the PROBE command. Note that these settings cannot be modified with the SET command.

    The list of available environment variable switches is

      HOME - Returns the user's home directory.

      On Windows platforms, this is the value of the USERPROFILE environment variable.

      On Linux platforms, this is the value of the HOME environment variable.

      USER - Returns the user name.

      On Windows platforms, this is the value of the USERPNAME environment variable.

      On Linux platforms, this is the value of the USER environment variable.

      HOST - Returns the computer name.

      On Windows platforms, this is the value of the COMPUTERNAME environment variable.

      On Linux platforms, this is the value of the HOST environment variable for the c-shell or t-shell and the HOSTNAME variable for the bash shell.

      DEFAULT PRINTER - Returns the default printer.

      On Linux platforms, this is the value of the PRINTER environment variable.

      This is not supported on Windows platforms.

      SHELL - Returns the current shell.

      On Linux platforms, this is the value of the SHELL environment variable.

      This is not supported on Windows platforms.

      WINDOWS BITS - Returns "64" if the machine is a 64-bit machine and "32" if the machine is a 32-bit machine.

      On Windows platforms, this is determined from the PROCESSOR_ARCHITECTURE environment variable.

      This is not supported on Linux platforms.

      PROGRAM FILES - On Windows platforms, this is the value of the PROGRAMFILES environment variable.

      This is not supported on Linux platforms.

      PROGRAM FILES X86 - On Windows platforms, this is the value of the PROGRAMFILES(X86) environment variable.

      This is not supported on Linux platforms.

Syntax:
    PROBE <SYSTEM SWITCH>
    where <SYSTEM SWITCH> is one of the names listed above.
Examples:
    PROBE HOME
    PROBE USER
    PROBE HOST
    PROBE DEFAULT PRINTER
    PROBE SHELL
    PROBE PROGRAM FILES X86
    PROBE PROGRAM FILES
    PROBE WINDOW BITS
Note:
    The value is saved in the string PROBESTR. You can save the value to your own string as follows

      PROBE USER
      LET STRING USERNAME = ^PROBESTR
Default:
    Dataplot queries the values of these settings when Dataplot is first initialized.
Synonyms:
    USER PROFILE is a synonym for HOME
    USER NAME is a synonym for USER
    HOST NAME is a synonym for HOST
    COMPUTER NAME is a synonym for HOST
Related Commands: Applications:
    Debugging
Implementation Date:
    2020/01
Program:
     
    PROBE USER
    LET STRING USERNAME = ^PROBESTR
    PROBE HOST
    LET STRING COMPNAME = ^PROBESTR
    PROBE HOME
    LET STRING USERHOME = ^PROBESTR
    .
    PRINT "Computer Name:   ^COMPNAME"
    PRINT "User Name:       ^USERNAME"
    PRINT "Home Directory:  ^USERHOME"
        
    The following output was generated
    Computer Name:   h048122.nist.gov
    User Name:       heckert
    Home Directory:  /home/heckert/
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 01/08/2020
Last updated: 01/08/2020

Please email comments on this WWW page to alan.heckert@nist.gov.