corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Why doesn't this simple script work


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Why doesn't this simple script work
RS6
Member

Registered: 5th Nov 03
Location: with MJ
User status: Offline
25th Apr 06 at 18:33   View User's Profile U2U Member Reply With Quote

Trying to get this loop to work, i used it before for some coursework worked then but not now?

any ideas its unix just for inputting a name into a script



echo "Please Type in your Name & Press the Enter Key"
read username
echo ""
echo "Is the above information $username correct Press 1 for YES & 2 for NO?"
read answer3
until [ answer3 -ne 2 ]
do
if [ answer3 -eq 2 ]
then
echo "PLEASE RE-ENTER YOUR NAME DETAILS"
read username
echo""
echo "Is the Above information $username correct press 1 for YES and 2 for NO"
read answer3
fi
done
if [ answer3 -eq 1 ]
then
echo "Choice Accepted"
echo ""
fi
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
25th Apr 06 at 19:09   View Garage View User's Profile U2U Member Reply With Quote

What shell was it written for, and what is your shell now?
RS6
Member

Registered: 5th Nov 03
Location: with MJ
User status: Offline
26th Apr 06 at 09:51   View User's Profile U2U Member Reply With Quote

KSH, for unix shell script written in jpico
Tim
Site Administrator

Avatar

Registered: 21st Apr 00
User status: Offline
26th Apr 06 at 10:37   View Garage View User's Profile U2U Member Reply With Quote

Works fine for me, except I don't exactly agree with your logic above (think there's better ways of writing it)...

What is not working for you?
Jules
Member

Registered: 26th Nov 04
Location: Ipswich, Suffolk Status: Happy
User status: Offline
26th Apr 06 at 11:16   View User's Profile U2U Member Reply With Quote

10 print "U R The L33t"
20 goto 10
Run

I think that should solve it

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Need help on VB pls Red_Corsa General Chat 14 677
18th Mar 03 at 23:00
by Trotty
 
Enter the Matrix - PC Game FOR SALE japturbo.com Classifieds 7 286
17th May 03 at 14:04
by bobothebear
 
Split this forum? Ian Classifieds 52 3436
15th Oct 03 at 19:33
by mav
 
Maybe Ian or Tim will know this, but anyone else too... PaulW Geek Day 7 966
16th Dec 03 at 19:50
by Trucido
 
Sorted out some bits on corsa 3CorsaMeal General Chat 0 331
18th Feb 05 at 10:00
by 3CorsaMeal
 

Corsa Sport » Message Board » Off Day » Geek Day » Why doesn't this simple script work 29 database queries in 0.0964060 seconds