NAME

[ Program Manual | User's Guide | Data Files | Databases ]

Table of Contents
FUNCTION
DESCRIPTION
EXAMPLE
OUTPUT
RELATED PROGRAMS
RESTRICTIONS
CONSIDERATIONS
SUGGESTIONS
COMMAND-LINE SUMMARY
LOCAL DATA FILES
PARAMETER REFERENCE

FUNCTION

[ Top | Next ]

Name creates, changes, deletes, or displays GCG logical name(s) from the GCG logical names table.

DESCRIPTION

[ Previous | Top | Next ]

Programs of the Wisconsin Package(TM) use logical names to refer to various resources in the file system. These resources can be directories, databases, system utilities, shell scripts, devices, or files. Each logical name has an identifier and one or more associated values. For example, the logical name GenDocDriver has as its single value the name of the directory that contains the driver files that generate Wisconsin Package documentation (although you can assign more than one value to a logical name). The logical name identifiers and their values are maintained in a table by a server process. The Name program provides a command-line interface to the logical names table.

Logical name identifiers are case insensitive, meaning you can enter the letters in uppercase, lowercase, or mixed case. For example, the logical name you specify as GenDocDriver is the same as that specified by gendocdriver. An identifier can have up to 31 characters and can contain any combination of alphanumeric characters, plus the dollar sign ($), underscore (_), and hyphen (-) characters. The values associated with logical name identifiers are case sensitive and can contain up to 1,024 characters that have ASCII values between hyphen and tilde (~).

When the Wisconsin Package is initialized at the start of a session, Name is used to establish a table of logical name identifiers with values that are appropriate for your site. During the course of your session, some programs may establish new logical names and may modify the values of some existing logical names as a side effect of their execution.

To display the current contents of the logical names table, type % name . To find the logical names that start with a specific character pattern, you can use the asterisk (*) and question mark (?) wildcards. For example, to find all logical names that start with di you would type % name di* . In this case the di* acts as an identifier specification because it may refer to more than one logical name.

EXAMPLE

[ Previous | Top | Next ]

Here is an example that shows you how to create a logical name:

% name -Set mygcgdir /usr/users/burgess/gcgdir
%

For the rest of your GCG session, you can refer to the directory /usr/users/burgess/gcgdir by typing mygcgdir. For example, if the file test.seq is in directory /usr/users/burgess/gcgdir, you might operate on the file by entering % fasta mygcgdir:test.seq.

Here is a session that shows you how to delete the logical name you just created:

% name -Unset mygcgdir
%

With the -Unset parameter, you can also use an identifier specification to refer to a related group of logical names. For example, you could have entered % name -Unset mygcg* to unset any or all logical names with identifiers that begin with mygcg.

OUTPUT

[ Previous | Top | Next ]

There is no output for this program.

RELATED PROGRAMS

[ Previous | Top | Next ]

Symbol creates, changes, deletes, or displays GCG symbol(s) from the GCG symbol table. (Also referred to as the symbol(1) command.)

RESTRICTIONS

[ Previous | Top | Next ]

The TableMap program must establish a memory table before Name can operate.

Logical name identifiers are case insensitive, can have up to 31 characters and can contain any combination of alphanumeric characters, plus the dollar sign ($), underscore (_), and hyphen (-) characters. The values associated with logical name identifiers are case sensitive and can contain up to 1,024 characters that have ASCII values between hyphen and tilde (~).

CONSIDERATIONS

[ Previous | Top | Next ]

Logical names differ from environment variables in the manner in which they are inherited by programs. When you use Name to change a current logical name or create a new one, the change to the logical names table becomes immediately visible to all GCG processes running in the context of the current session. In contrast, processes always see the contents of the environment table as it existed at the time that they were started.

The order of the parameters for -Set is identifier followed by value. If you like, you can bypass this implied order by using the -Name=identifier and -Value=value parameters in any order on the command line. (See the PARAMETER REFERENCE topic for more information.)

You can assign more than one value to the same logical name. For example, % name -S workdir /usr/smith/gcgdata /usr/jones/gcgdata creates a logical name (WorkDir) that refers to two resources (/usr/smith/gcgdata and /usr/jones/gcgdata).

(If you use Name in a shell script, note that it sets its exit status to zero when operation is successful, or to -1 if unsuccessful.)

SUGGESTIONS

[ Previous | Top | Next ]

Any change you make to the logical names table for a session is in effect during that session only; once you log off, the change is lost. If you want to assign values to logical names at login, you should put the information in your .gcgrc file. (See "Customizing Your Login" in Chapter 1, Getting Started of the User's Guide for information about the .gcgrc file.)

If you have a long list of logical names you wish to assign, you can type the identifiers and values into a text file, and feed this information to Name by using the parameter -INfile=filename. (See the PARAMETER REFERENCE topic for more information.) For example, you can create a file called "inputfile" containing the following:

..
greeting                hello
farewell                "bye bye"
animal                  cat

Then, % name -S -in=INputfile assigns the values in the second column to the identifiers in the first column. Note that the presence of the comment delimiter ".." above the list is crucial (anything above this delimiter is ignored by Name).

COMMAND-LINE SUMMARY

[ Previous | Top | Next ]

All parameters for this program may be added to the command line. Use -CHEck to view the summary below and to specify parameters before the program executes. In the summary below, the capitalized letters in the parameter names are the letters that you must type in order to use the parameter. Square brackets ([ and ]) enclose parameter values that are optional. For more information, see "Using Program Parameters" in Chapter 3, Using Programs in the User's Guide.


Minimal Syntax: % name

Prompted Parameters:  None

Local Data Files:     None

Optional Parameters:

-Set identifier value     changes the value of the logical name
                            or adds a new logical name
-Unset identifier-spec    deletes all logical names matching
                            identifier-spec
-Name=identifier          lets you enter a logical name identifier
                            anywhere on the command line
-Value=value              lets you enter a logical name value
                            anywhere on the command line
-Quiet                    suppress all messages
-File identifier          looks in the file system
-KILL                     stops the logical names service for
                            the session
-List identifier-spec     lists all logical names matching the
                            identifier-spec

LOCAL DATA FILES

[ Previous | Top | Next ]

None.

PARAMETER REFERENCE

[ Previous | Top | Next ]

You can set the parameters listed below from the command line. For more information, see "Using Program Parameters" in Chapter 3, Using Programs in the User's Guide.

Note that although there are no required parameters for the Name command, you would generally use it with the -Set or -Unset parameters. In addition, when you assign a logical name to a directory with % name -Set, you can change to that directory by entering % to mygcgdir. (See "Changing Directories" in Chapter 1, Getting Started of the User's Guide.)

-Set identifier value

creates a logical name or assigns a new value to an existing one. For example, % name -S workdir /usr/jones/gcgdata creates the logical name WorkDir that refers to the directory /usr/jones/gcgdata. If you leave out the identifier value, Name prompts you for the information.

-Unset identifier-spec

deletes an existing logical name. This parameter is the opposite of the -Set parameter.

-Quiet

suppresses any screen display (exit status is set as usual).

-KILL

stops the logical name service from running. (If you use this parameter, and we can think of no reason why you would, you must restart the Wisconsin Package by entering % gcg .)

-File

looks in the file system for a file that matches whatever the argument recursively resolves to. The name of the file (if any) is displayed. For example, if the logical name Foo has value Bar, and the logical name Bar has value /usr/smith/test.tmp, % name -f foo will display /usr/smith/test.tmp if that file exists.

-Name=identifier

lets you enter an identifier anywhere on the command line.

-Value=value

lets you enter a value for the logical name anywhere on the command line.

-INfile=filename

looks for a list of logical names and values in a text file called "filename." Name runs through this list and sets each logical name, appearing in the first column, to the associated value, appearing in the second column. The list must be preceded by the comment delimiter "..", appearing on a separate line.

-List identifier-spec

displays the logical names that match an identifier specification, along with the values associated with those names.

Printed: December 9, 1998 16:30 (1162)

[ Program Manual | User's Guide | Data Files | Databases ]


Documentation Comments: doc-comments@gcg.com
Technical Support: help@gcg.com

Copyright (c) 1982-2001 Genetics Computer Group, Inc. A subsidiary of Pharmacopeia, Inc. All rights reserved.

Licenses and Trademarks Wisconsin Package is a trademark of Genetics Computer Group, Inc. GCG and the GCG logo are registered trademarks of Genetics Computer Group, Inc.

All other product names mentioned in this documentation may be trademarks, and if so, are trademarks or registered trademarks of their respective holders and are used in this documentation for identification purposes only.

Genetics Computer Group

www.gcg.com