get_mapped_host

Purpose:

Get the hostname of a mapped file or resource.

Enter:

get_mapped_host <keyword>

Where:

keyword

Specify the keyword string that is located in the file /data/cell_map_location and is associated with the requested file.
If the keyword is not known, it can be determined by looking at the file /data/cell_map_location or you can enter the command ‘map_keywords’.

Example:

get_mapped_host @SPECS_DEF_NODE
The above command results in ‘ctcnode4’ being printed on STD_OUT.

Notes:

The following is an example of how to use this command in a script file called “gethost” that needs to know where the world drive is located.

——————————————————————————-  
#!/bin/sh  
 
hostname=’get_mapped_host $1′  
if [ “$hostname” = ‘NOT FOUND’ ]  
then  
    echo get_mapped_host could not find keyword=$1  
    exit  
else  
    if [ “$file” = ‘NO KEYWORD ENTERED’ ]  
    then  
        echo Missing KEYWORD argument to get_mapped file  
        exit  
    fi  
fi  
# do what ever you need to do  
.  
.  
——————————————————————————  
 

To use the above script, enter the following in the command line:

gethost @SPECS_DEF_NODE

See Also: