title: Shell script argument present or not
body: <p>I have a shell script, where sometimes user gives the required arg sometimes they forget. So I needed someway in which if the user has already provided the particular argument then the user should not be prompted for that particular arg. Can anyone help? <p>Example script: </p>
  
  <pre><code>#!/bin/sh
  if [ $GAME =="" ]
  then
      echo Enter path to GAME:
      read GAME
  else
      echo $GAME
  fi
  </code></pre>
  
  <p>Example O/P 1:</p>
  
  <blockquote>
    <p>$ ./sd.sh -GAME asdasd<br/>
    Enter path to GAME:<br/>
    ?asd<br/></p>
  </blockquote>
  
  <p>Example O/P 2:</p>
  
  <blockquote>
    <p>$ ./sd.sh<br/>
    Enter path to GAME:<br/>
    asd<br/></p>
  </blockquote>