{"id":870,"date":"2024-12-10T08:34:10","date_gmt":"2024-12-10T08:34:10","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=870"},"modified":"2024-12-10T08:34:33","modified_gmt":"2024-12-10T08:34:33","slug":"mwnci-whoami-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-whoami-function\/","title":{"rendered":"Mwnci whoami() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>whoami<strong>()<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>whoami()<\/i> function returns the username (login name) of the user that is running the current process.<\/p>\n<h2>Example<\/h2>\n<pre>\r\nUser=whoami()\r\nprintln(\"Hello \", User)\r\nif (User != \"root\") {\r\n    println(\"You must be root to run this\")\r\n}\r\n\r\n\r\nHello eccles\r\nYou must be root to run this\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax whoami() Description The whoami() function returns the username (login name) of the user that is running the current process. Example User=whoami() println(&#8220;Hello &#8220;, User) if (User != &#8220;root&#8221;) { println(&#8220;You must be root to run this&#8221;) } Hello eccles You must be root to run this<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-870","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/870","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=870"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/870\/revisions"}],"predecessor-version":[{"id":871,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/870\/revisions\/871"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}