title: Bash script for tar menu, syntax errors in case conditionals
body: <p>I'm trying to make a bash script that echos a menu from which a user can archive , extract and update files. I keep getting syntax errors however in my case conditionals, i've only recently started bash regex and other linux tools so i'm a bit muddled syntactically, could someone point out the right syntax to use for <strong>conditionals in *<em>the case structure</em>*</strong> for this example ?
  here's some of the code i have so far:</p>
  
  <pre><code>    #!/bin/bash
      echo "Today's date is $(date)"
      echo "The current directory $(pwd)"
      echo -e "A full list of contents follows: $(ls -R)\n"
  
      echo -e "\n       Archive Menu\n"
      echo "  a.   Archive a file or directory."
      echo "  b.   Extract a file or directory from an archive."
      echo "  c.   Update archive of current directory based on timestamp."
      echo -e "   d.   Exit.\n"
      read -p "Enter a, b, c, or d: " answer
      echo
      #
      case "$answer" in
  a)
      read -p "Please enter full path to the file you wish to archive: " path
      read -p "Please enter destination for the archived file (leave empty for current drectory)" dest 
      if [[ "$dest" == null]] ;
          then 
              tar -cvf $path
              tar -tvf $path
              exit 0
          fi;
      if [[ "dest" == ""]];
          then 
              tar -cvf $path $dest
              tar -tvf $path 
              exit 0
          fi;
      ;;
  b)
      read -p "Please enter full path to the file you wish to extract: " path 
      read -p "Please enter destination for extracted file (leave empty for current directory)" dest
      if [ "$dest" == null]
          then 
              tar -xvf $path
              tar -tvf $path 
              exit 0
          fi
      if [ "$dest" == ""]
          then
              tar -xvf $path $dest
              tar -tvf $path
              exit 0
          fi
      ;;
  c)
     esac
  </code></pre>
  
  <p>some of the error messages i've been getting are: </p>
  
  <pre><code>   metar.sh:line 18: syntax error in conditional expression: unexpected token';'
     metar.sh:line 18: syntax error near ';'
     metar.sh:line 18 '               if[[ "$dest == null]] ;'
  </code></pre>