Can't figure out âSyntax error near unexpected token `done'â issue
Clash 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
bash shell-script
New contributor
add a comment |Â
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
bash shell-script
New contributor
add a comment |Â
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
bash shell-script
New contributor
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
bash shell-script
New contributor
New contributor
New contributor
asked 5 mins ago
keeperkell13
6
6
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password