{"id":3698,"date":"2019-02-12T16:09:38","date_gmt":"2019-02-12T16:09:38","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/1-utilities-and-user-commands\/get_mapped_host\/"},"modified":"2025-08-19T12:47:58","modified_gmt":"2025-08-19T17:47:58","slug":"get_mapped_host","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/11-utilities-and-user-commands\/get_mapped_host\/","title":{"rendered":"get_mapped_host"},"content":{"rendered":"<div>\n<h3>Purpose:<\/h3>\n<\/div>\n<dl>\n<dd>\n<p>Retrieve and print the hostname associated with a specified keyword from a mapping file.<\/p>\n<\/dd>\n<\/dl>\n<h3>Enter:<\/h3>\n<dl>\n<dd>\n<p><strong>get_mapped_host<\/strong> &lt;keyword&gt;<\/p>\n<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<div>\n<table cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/> <\/colgroup>\n<tbody>\n<tr>\n<td>\n<p>keyword<\/p>\n<\/td>\n<td>\n<p>Specify the keyword string used to look up and retrieve the corresponding hostname.<br \/>\nIf the keyword is not known, it can be determined by looking at the file \/data\/cell_map_location or enter the command &#8216;map_keywords&#8217;.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd>\n<p>get_mapped_host @SPECS_DEF_NODE<br \/>\nThe above command results in \u2018ctcnode4\u2019 being printed on STD_OUT.<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>If no keyword is provided, the program outputs &#8216;NO KEYWORD ENTERED&#8217; and exits with a non-zero status.<\/p>\n<p>The following is an example of how to use this command in a script file called &#8220;gethost&#8221; that needs to know where the world drive is located.<\/p>\n<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- \u00a0<br \/>\n#!\/bin\/sh \u00a0<br \/>\n\u00a0<br \/>\nhostname=&#8217;get_mapped_host $1&#8242;\u00a0\u00a0<br \/>\nif [ &#8220;$hostname&#8221; = &#8216;NOT FOUND&#8217; ] \u00a0<br \/>\nthen \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0echo\u00a0get_mapped_host\u00a0could\u00a0not\u00a0find\u00a0keyword=$1 \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0exit \u00a0<br \/>\nelse \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0if [ &#8220;$file&#8221; = &#8216;NO KEYWORD ENTERED&#8217; ] \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0then \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0echo\u00a0Missing\u00a0KEYWORD\u00a0argument\u00a0to\u00a0get_mapped\u00a0file \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0exit \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0fi \u00a0<br \/>\nfi \u00a0<br \/>\n#\u00a0do\u00a0what\u00a0ever\u00a0you\u00a0need\u00a0to\u00a0do \u00a0<br \/>\n. \u00a0<br \/>\n. \u00a0<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; \u00a0<br \/>\n\u00a0<\/div>\n<p>To use the above script, enter the following in the command line:<\/p>\n<p>gethost @SPECS_DEF_NODE<\/p>\n<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<dl>\n<dd>\n<p>&nbsp;<\/p>\n<\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Retrieve and print the hostname associated with a specified keyword from a mapping file. Enter: get_mapped_host &lt;keyword&gt; Where: keyword Specify the keyword string used to look up and retrieve the corresponding hostname. If the keyword is not known, it can be determined by looking at the file \/data\/cell_map_location or enter the command &#8216;map_keywords&#8217;. Example: [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1948,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3698","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=3698"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3698\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1948"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=3698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}