title: Get the current script path from MongoDB shell
body: <p>I'm writing JavaScript code for MongoDB shell in client. How can I get the path of the script file which is executing? Please note it's not the value of <code>pwd()</code>. For example, I'm executing <code>/my_scripts/utils.js</code> from <code>/my_path</code>:</p>
  
  <pre><code>&gt; mongodb --nodb /my_scripts/utils.js
  </code></pre>
  
  <p>so <code>pwd()</code> returns <code>/my_path</code>, but how can I get the full path (or relative path to the value of <code>pwd()</code>) of the current executing file, which is <code>/my_scripts/utils.js</code>?</p>