title: Converting Javascript to bash
body: <p>Ok here is my question this is just a standard javascript functions all it does is when a certain checkbox is clicked it selects all the ones following that proper id match</p>
  
  <p>So what im curious is how do i take this javascript function and make it usable in bash scripting... So i can call this function in my script if that makes sense!  </p>
  
  <pre><code>echo '&lt;input type=checkbox list=item1&gt; num1'
  echo '&lt;input type=checkbox list=item2&gt; num2'
  echo '&lt;input type=checkbox list=item3&gt; num3'
  
  
  
  
  
  
  $(function(){
    $("#allcb").click(function() {
       var chkBoxes = $("input[id^=cb]");
       chkBoxes.prop("checked", !chkBoxes.prop("checked"));
      }); 
  });
  </code></pre>
  
  <p>so I add some basic code. so the cgi file outputs into the html to construct those checkboxes.  now is there anyway to achieve this java-script function even if we don't use it.</p>