title: How do I pass an integer argument to a shell script which then passes it to a program?
body: <p>Here is a sample of what I'm trying to do:</p>
  
  <pre><code>#!/bin/bash
  set n = $argv[1]
  g++ main.cpp
  ./a.out n
  </code></pre>
  
  <p>I am trying to call it in the shell like this:</p>
  
  <pre><code>myscript 3
  </code></pre>
  
  <p>The output is different from doing the following</p>
  
  <pre><code>./a.out 3
  </code></pre>
  
  <p>But I want it to be the same. How is it done?</p>