title: Linux Shell Script - Back up / Restore
body: <p>Hi Community of Stackoverflow,</p>
  
  <p>I am facing a problem here with my shell script that I am designing... </p>
  
  <pre><code>#!/bin/sh
  while :
  do
  clear
  echo "-----------------------------
  -----------"
  echo "***************Main Menu****************"
  echo "----------------------------------------"
  echo "1. Backup Word Document"
  echo "2. Backup Spreadsheet"
  echo "3. Backup Picture"
  echo "4. Restore Word Documents"
  echo "5. Restore Spreadsheet"
  echo "6. Restore Picture"
  echo "7. EXIT"
  
  echo "----------------------------------------"
  pause
  echo -n "Enter your menu choice [1-7]:"
  read yourch
  case $yourch in
  1) echo ; tar -cvf /Files/*.doc /WP/ ; read ;;
  
  1) echo "Today is";  date +%Y%m%d-%H:%M 2&gt;&amp;1 ; echo "Press a key..." ; read ;;
  
  2) echo ; tar -cvf /Files/*.xls /EXCEL/ ; read ;;
  
  2) echo "Today is";  date +%Y%m%d-%H:%M 2&gt;&amp;1 ; echo "Press a key..." ; read ;;
  
  3) echo ; tar -cvf /Files/*.jpg /PICS/ ; read ;;
  
  3) echo "Today is";  date +%Y%m%d-%H:%M 2&gt;&amp;1 ; echo "Press a key..." ; read ;;
  
  4) echo ; tar xvzf /WP/*.doc ; read ;;
  5) echo ; tar xvzf /EXCEL/*.xls ; read ;;
  6) echo ; tar xvzf /PICS/*.jpg ; read ;;
  7) exit 0 ;;
  
  *) echo "Please press a number between 1 to 7";
  </code></pre>
  
  <p>A error displays 'cript: line 21: syntax error near unexpected token 'in
                   'cript: line 21: 'case $yourch</p>
  
  <p>Does anyone know how to by pass this error? Basically what im trying to do is be able to back up a set of files with the file name ".doc" and place them in a backup folder. I can then restore the files from this folder to another folder.</p>
  
  <p>Kind Regards,</p>
  
  <p>Ben</p>