title: BeagleBone Black - Bonescript Syntax Error
body: <p>I am having issues running scripts using Bonescript on my BeagleBone black. When I run the scripts in a web browser, it executes as normal. However, when I try executing them from a terminal window, they won't run.</p>
  
  <pre><code>#!/bin/bash
  var b = require('bonescript');
  
  var leds = ["USR0", "USR1", "USR2", "USR3", "P9_14"];
  
  for(var i in leds) {
      b.pinMode(leds[i], b.OUTPUT);
  }
  
  var state = b.LOW;
  for(var i in leds) {
      b.digitalWrite(leds[i], state);
  }
  
  setInterval(toggle, 1000);
  
  function toggle() {
      state = (state == b.LOW) ? b.HIGH : b.LOW;
      for(var i in leds) {
          b.digitalWrite(leds[i], state);
      }
  }
  
  
  
  
  debian@beaglebone:~$ ./BlinkLED.js 
  ./BlinkLED.js: line 2: syntax error near unexpected token `('
  ./BlinkLED.js: line 2: `var b = require('bonescript');'
  </code></pre>