<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hmm, the same happens for me. Perhaps $HOSTNAME is null until
    polled, so it is generated upon request by the command line call?<br>
    <br>
    One possible workaround is to set an env variable right before
    launching chuck, eg:<br>
    <br>
    NETNAME="$HOSTNAME" chuck myfile.ck<br>
    <br>
    and access Std.getenv("NETNAME") in your code.<br>
    <br>
    I wasn't aware of setenv or getenv before. Did getenv("HOSTNAME")
    work in the past?<br>
    <br>
    Joel<br>
    <br>
    <div class="moz-cite-prefix">On 09/18/2015 08:53 PM, Scott Smallwood
      wrote:<br>
    </div>
    <blockquote
      cite="mid:048C650E-26FA-4175-B1D4-99D2226987A7@ualberta.ca"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div class=""><br class="">
      </div>
      <div class="">Hey Chuckians…</div>
      <div class=""><br class="">
      </div>
      <div class="">Question for those who use Std.setenv().  I’m trying
        to resurrect some old code of mine that made use of a special
        environment variable we used to use in plork to identify
        machines over the network.  In short:  this was a variable we
        called “NET_NAME”, in which we specified the network name
        address (i.e. blah.local) on our local area wireless network.</div>
      <div class=""><br class="">
      </div>
      <div class="">What I’m wondering is this:  in UNIX, there is
        usually a variable already in existence called “HOSTNAME”.  For
        example, on my mac, when I type “echo $HOSTNAME” in the
        terminal, it returns a string that contains the name of my
        machine with .local appended to it.</div>
      <div class=""><br class="">
      </div>
      <div class="">However, when I try to recall this variable using
        Std.setenv(), I get nothing.</div>
      <div class=""><br class="">
      </div>
      <div class="">Anyone have any ideas here?</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div style="color: rgb(0, 0, 0); letter-spacing: normal;
          orphans: auto; text-align: start; text-indent: 0px;
          text-transform: none; white-space: normal; widows: auto;
          word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap:
          break-word; -webkit-nbsp-mode: space; -webkit-line-break:
          after-white-space;" class="">
          <div style="color: rgb(0, 0, 0); letter-spacing: normal;
            orphans: auto; text-align: start; text-indent: 0px;
            text-transform: none; white-space: normal; widows: auto;
            word-spacing: 0px; -webkit-text-stroke-width: 0px;
            word-wrap: break-word; -webkit-nbsp-mode: space;
            -webkit-line-break: after-white-space;" class="">
            <div style="color: rgb(0, 0, 0); letter-spacing: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              word-wrap: break-word; -webkit-nbsp-mode: space;
              -webkit-line-break: after-white-space;" class="">
              <div style="color: rgb(0, 0, 0); font-family: Helvetica;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; line-height: normal;
                orphans: 2; text-align: -webkit-auto; text-indent: 0px;
                text-transform: none; white-space: normal; widows: 2;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                word-wrap: break-word; -webkit-nbsp-mode: space;
                -webkit-line-break: after-white-space;" class="">
                <div style="color: rgb(0, 0, 0); font-family: Helvetica;
                  font-style: normal; font-variant: normal; font-weight:
                  normal; letter-spacing: normal; line-height: normal;
                  orphans: 2; text-align: -webkit-auto; text-indent:
                  0px; text-transform: none; white-space: normal;
                  widows: 2; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; word-wrap: break-word;
                  -webkit-nbsp-mode: space; -webkit-line-break:
                  after-white-space;" class="">
                  <div style="color: rgb(0, 0, 0); font-family:
                    Helvetica; font-style: normal; font-variant: normal;
                    font-weight: normal; letter-spacing: normal;
                    line-height: normal; orphans: 2; text-align:
                    -webkit-auto; text-indent: 0px; text-transform:
                    none; white-space: normal; widows: 2; word-spacing:
                    0px; -webkit-text-stroke-width: 0px; word-wrap:
                    break-word; -webkit-nbsp-mode: space;
                    -webkit-line-break: after-white-space;" class=""><span
                      class="Apple-style-span" style="border-collapse:
                      separate; color: rgb(0, 0, 0); font-family:
                      Helvetica; font-style: normal; font-variant:
                      normal; font-weight: normal; letter-spacing:
                      normal; line-height: normal; orphans: 2;
                      text-indent: 0px; text-transform: none;
                      white-space: normal; widows: 2; word-spacing: 0px;
                      border-spacing: 0px;
                      -webkit-text-decorations-in-effect: none;
                      -webkit-text-stroke-width: 0px;">
                      <div style="word-wrap: break-word;
                        -webkit-nbsp-mode: space; -webkit-line-break:
                        after-white-space;" class=""><span
                          class="Apple-style-span"
                          style="border-collapse: separate; color:
                          rgb(0, 0, 0); font-family: Helvetica;
                          font-style: normal; font-variant: normal;
                          font-weight: normal; letter-spacing: normal;
                          line-height: normal; orphans: 2; text-indent:
                          0px; text-transform: none; white-space:
                          normal; widows: 2; word-spacing: 0px;
                          border-spacing: 0px;
                          -webkit-text-decorations-in-effect: none;
                          -webkit-text-stroke-width: 0px;">
                          <div style="word-wrap: break-word;
                            -webkit-nbsp-mode: space;
                            -webkit-line-break: after-white-space;"
                            class="">—ss</div>
                          <div style="word-wrap: break-word;
                            -webkit-nbsp-mode: space;
                            -webkit-line-break: after-white-space;"
                            class=""><br class="">
                          </div>
                          <div style="word-wrap: break-word;
                            -webkit-nbsp-mode: space;
                            -webkit-line-break: after-white-space;"
                            class="">[ - ]  <a moz-do-not-send="true"
                              href="http://www.scott-smallwood.com"
                              class="">Scott Smallwood</a> - Associate
                            Professor - University of Alberta  [ - ]</div>
                        </span></div>
                    </span></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br class="">
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
chuck-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>