I am creating a menu in a script (#!/bin/bash), and it works as I needed:
PS3='[ menu ] choose partition tool:' options=("fdisk" "cfdisk" "continue") select opt in "${options[@]}" do case $opt in "fdisk") fdisk /dev/sda ;; "cfdisk") cfdisk ;; "continue") break ;; *) echo "invalid option $REPLY" ;; esac done
this is the result on screen:
1) fdisk 2) cfdisk 3) continue [ menu ] choose partition tool:
how can I transform the layout like this (?):
[ menu ] choose partition tool (1) fdisk (2) cfdisk (3) continue:
in a nutshell, I know that it is enough to write the options in PS3= like this: PS3='[ menu ] choose partition tool (1) fdisk (2) cfdisk (3) continue:' but I want to know how not to bring up the options list (up on description).