1) Item 1
2) Item 2
Enter : 2
Item 2 Menu
1) sub Item A
2) sub item B
enter: 1
pmenu () {
printf '%s) %sn' "$1" "$2"
}
m1 () {
pmenu 1 'Item 1'
pmenu 2 'Item 2'
}
m2 () {
pmenu 1 'sub Item A'
pmenu 2 'sub Item B'
}
printf 'Hello, World:n'
m1
read -p "enter: " m
case "$m" in
1 ) m2 ;;
2 ) m2 ;;
esac
read -p "enter: " m
echo "You chose: $m"
printf '2n1n' | program
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.