Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bash question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
gentoo_newguy
Guru
Guru


Joined: 10 Oct 2006
Posts: 539

PostPosted: Fri Mar 28, 2008 12:09 am    Post subject: Bash question Reply with quote

Hi i was wondering if anyone could help me.
I am making a simple bash script and am having a slight problem,

My script ask's the user a simple question.

echo "What file system would you like to use for root"
echo " 1.ext2 2.ext3 3.reiserfs "
read -e answerer

Im then trying to right an if statement that then apply s the file system to the answer the user has given.
The trouble i am having is if the user types 4 for instance the script ends.
Is there away i could possible re run the question if the answer is either 1 2 or 3.

I hope i explained this well enough
Back to top
View user's profile Send private message
think4urs11
Administrator
Administrator


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Fri Mar 28, 2008 12:56 am    Post subject: Reply with quote

DUP for Bash question
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum