Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

AllaN01Bear

(22,402 posts)
Fri Mar 29, 2024, 05:28 PM Mar 2024

select menus.

in my old dos days id be able to make a select menu .
such as 1) ms word 2) star trek. 3 ) calculator.
you get the picture .
i am now on mac os . i have been playing with terminal and wondering if i could do same .
i found examples that are full of errors as the terminal will debug. so, i give up.

2 replies = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
select menus. (Original Post) AllaN01Bear Mar 2024 OP
If it's really simple (textual) you can do it in shell scripts. usonian Mar 2024 #1
thanks . ill give them a try. AllaN01Bear Mar 2024 #2

usonian

(12,345 posts)
1. If it's really simple (textual) you can do it in shell scripts.
Fri Mar 29, 2024, 05:57 PM
Mar 2024

Using the cursor is more complicated (been there, done that) and requires curses and termcap stuff. There may be packages that encapsulate that, but it would take time to look up.

Here are two quick finds:

https://linuxconfig.org/how-to-create-a-selection-menu-using-the-select-statement-in-bash-shell

to get a screen like this:

Choose one:
1) file1
2) file2
3) file3
#? 1
You selected file1

More complex stuff at askubuntu.com (only try the simple stuff, please)
https://askubuntu.com/questions/1705/how-can-i-create-a-select-menu-in-a-shell-script


NOTE: Apple changed the default shell to zsh in recent releases (Ventura and newer? ), so if you want good old bash shell, you have to change your login.
Latest Discussions»Help & Search»Computer Help and Support»select menus.