title: Bash- passing input without shell interpreting parameter expansion chars
body: <p>So I have a script where I type the script.sh followed by input for a set of if-else statements. Like this:</p>
  
  <pre><code>    script.sh fnSw38h$?2
  </code></pre>
  
  <p>The output echoes out the input in the end.</p>
  
  <p>But I noticed that $? is interpreted as 0/1 so the output would echo:</p>
  
  <pre><code>    fnSw38h12
  </code></pre>
  
  <p>How can I stop the shell from expanding the characters and take it face value? </p>
  
  <p>I looked at something like opt noglob or something similar but they didn't work.
  When I put it like this:</p>
  
  <pre><code>    script.sh 'fnSw38h$?2'
  </code></pre>
  
  <p>it works. But how do I capture that within single quotes ('') when I can't state variables inside it like Var='$1'</p>
  
  <p>Please help!</p>