Can't figure out “Syntax error near unexpected token `done'” issue

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












So I am new to posting after lurking for a while and I know this questions has been asked a lot but I can't seem to solve the issue. I am having the error "Syntax error near unexpected token `done' " and just can not figure out the issue.Any help would be much appreciated, My code is below:



trap "rm ~/tmp/* 2> /dev/null; exit" 0 1 2 3
phonefile=~/sournce/corp_phones
looptest=y
while [ $looptest" = y ]
do
clear
cursor 1 4; echo "Corporate Phone List Additions"
cursor 2 4; echo "=============================="
cursor 4 4; echo "Phone Number: "
cursor 5 4; echo "Last Name : "
cursor 6 4; echo "First Name : "
cursor 7 4; echo "Middle Init : "
cursor 8 4; echo "Dept # : "
cursor 9 4; echo "Job Title : "
cursor 10 4; echo "Date Hired :"
cursor 12 4; echo "Add Another? (Y)es or (Q)uit "
cursor 4 18; read phonenum
if [ "$phonenum" = 'q' ]
then
clear; exit
fi
cursor 5 18; read lname
cursor 6 18; read fname
cursor 7 18; read midinit
cursor 8 18; read deptno
cursor 9 18; read jobtitle
cursor 10 18; read datehired
#check to see if last name is not a blank before write to disk
if [ "$lname" > " "]
then
echo $phonenum:$lname:$fname:$midinit:$deptno:$jobtitle:$datehired >> $phonefile
fi
cursor 12 33; read looptest
if [ "$looptest" = 'q' ]
then
clear; exit
fi
done








share







New contributor




keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    1
    down vote

    favorite












    So I am new to posting after lurking for a while and I know this questions has been asked a lot but I can't seem to solve the issue. I am having the error "Syntax error near unexpected token `done' " and just can not figure out the issue.Any help would be much appreciated, My code is below:



    trap "rm ~/tmp/* 2> /dev/null; exit" 0 1 2 3
    phonefile=~/sournce/corp_phones
    looptest=y
    while [ $looptest" = y ]
    do
    clear
    cursor 1 4; echo "Corporate Phone List Additions"
    cursor 2 4; echo "=============================="
    cursor 4 4; echo "Phone Number: "
    cursor 5 4; echo "Last Name : "
    cursor 6 4; echo "First Name : "
    cursor 7 4; echo "Middle Init : "
    cursor 8 4; echo "Dept # : "
    cursor 9 4; echo "Job Title : "
    cursor 10 4; echo "Date Hired :"
    cursor 12 4; echo "Add Another? (Y)es or (Q)uit "
    cursor 4 18; read phonenum
    if [ "$phonenum" = 'q' ]
    then
    clear; exit
    fi
    cursor 5 18; read lname
    cursor 6 18; read fname
    cursor 7 18; read midinit
    cursor 8 18; read deptno
    cursor 9 18; read jobtitle
    cursor 10 18; read datehired
    #check to see if last name is not a blank before write to disk
    if [ "$lname" > " "]
    then
    echo $phonenum:$lname:$fname:$midinit:$deptno:$jobtitle:$datehired >> $phonefile
    fi
    cursor 12 33; read looptest
    if [ "$looptest" = 'q' ]
    then
    clear; exit
    fi
    done








    share







    New contributor




    keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      So I am new to posting after lurking for a while and I know this questions has been asked a lot but I can't seem to solve the issue. I am having the error "Syntax error near unexpected token `done' " and just can not figure out the issue.Any help would be much appreciated, My code is below:



      trap "rm ~/tmp/* 2> /dev/null; exit" 0 1 2 3
      phonefile=~/sournce/corp_phones
      looptest=y
      while [ $looptest" = y ]
      do
      clear
      cursor 1 4; echo "Corporate Phone List Additions"
      cursor 2 4; echo "=============================="
      cursor 4 4; echo "Phone Number: "
      cursor 5 4; echo "Last Name : "
      cursor 6 4; echo "First Name : "
      cursor 7 4; echo "Middle Init : "
      cursor 8 4; echo "Dept # : "
      cursor 9 4; echo "Job Title : "
      cursor 10 4; echo "Date Hired :"
      cursor 12 4; echo "Add Another? (Y)es or (Q)uit "
      cursor 4 18; read phonenum
      if [ "$phonenum" = 'q' ]
      then
      clear; exit
      fi
      cursor 5 18; read lname
      cursor 6 18; read fname
      cursor 7 18; read midinit
      cursor 8 18; read deptno
      cursor 9 18; read jobtitle
      cursor 10 18; read datehired
      #check to see if last name is not a blank before write to disk
      if [ "$lname" > " "]
      then
      echo $phonenum:$lname:$fname:$midinit:$deptno:$jobtitle:$datehired >> $phonefile
      fi
      cursor 12 33; read looptest
      if [ "$looptest" = 'q' ]
      then
      clear; exit
      fi
      done








      share







      New contributor




      keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      So I am new to posting after lurking for a while and I know this questions has been asked a lot but I can't seem to solve the issue. I am having the error "Syntax error near unexpected token `done' " and just can not figure out the issue.Any help would be much appreciated, My code is below:



      trap "rm ~/tmp/* 2> /dev/null; exit" 0 1 2 3
      phonefile=~/sournce/corp_phones
      looptest=y
      while [ $looptest" = y ]
      do
      clear
      cursor 1 4; echo "Corporate Phone List Additions"
      cursor 2 4; echo "=============================="
      cursor 4 4; echo "Phone Number: "
      cursor 5 4; echo "Last Name : "
      cursor 6 4; echo "First Name : "
      cursor 7 4; echo "Middle Init : "
      cursor 8 4; echo "Dept # : "
      cursor 9 4; echo "Job Title : "
      cursor 10 4; echo "Date Hired :"
      cursor 12 4; echo "Add Another? (Y)es or (Q)uit "
      cursor 4 18; read phonenum
      if [ "$phonenum" = 'q' ]
      then
      clear; exit
      fi
      cursor 5 18; read lname
      cursor 6 18; read fname
      cursor 7 18; read midinit
      cursor 8 18; read deptno
      cursor 9 18; read jobtitle
      cursor 10 18; read datehired
      #check to see if last name is not a blank before write to disk
      if [ "$lname" > " "]
      then
      echo $phonenum:$lname:$fname:$midinit:$deptno:$jobtitle:$datehired >> $phonefile
      fi
      cursor 12 33; read looptest
      if [ "$looptest" = 'q' ]
      then
      clear; exit
      fi
      done






      bash shell-script





      share







      New contributor




      keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 5 mins ago









      keeperkell13

      6




      6




      New contributor




      keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      keeperkell13 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          keeperkell13 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476160%2fcant-figure-out-syntax-error-near-unexpected-token-done-issue%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          keeperkell13 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          keeperkell13 is a new contributor. Be nice, and check out our Code of Conduct.












          keeperkell13 is a new contributor. Be nice, and check out our Code of Conduct.











          keeperkell13 is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476160%2fcant-figure-out-syntax-error-near-unexpected-token-done-issue%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay