To manage a menu you can use the switch case, its definition is: case $<variable> in <value_1>) <instructions> ; <value_2>) <instructions> ; ... <value_n>) <instructions> ; *) <instructions> ; esac Example

Read more of this post