LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-18-2010, 08:01 AM   #1
tolekutma
LQ Newbie
 
Registered: Sep 2010
Posts: 7

Rep: Reputation: 0
How to create a multi selection menu ?


Hi,


I am creating a program that need menu with multi selection option for shell (CLI).
I am using of Bash scripts.
something that will look like that:

~~~~~~~~~~~~~
Menu:
[ ] option 1
[x] option 2
[ ] option 3
[x] option 4

please select your option:

~~~~~~~~~~~~~~~~~~

It is behave such as checkbox, each selected item will get "X".

Does any one know on example for that?

[
My programing level is:
I am newbie to Linux scripting.
(advanced programmer in C/C++)
]

Thanks

Last edited by tolekutma; 09-18-2010 at 08:02 AM.
 
Old 09-18-2010, 09:41 AM   #2
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Rep: Reputation: Disabled
try:
Code:
man dialog
 
Old 09-18-2010, 10:16 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
AFAIK there is no tool to do that and it would be non-trivial (very!) to code it in bash using terminal escape sequences. Is there any reason why you can't write an ncurses program and run that from bash?

EDIT: thanks to harryhaller for correcting me (Excuse: I was looking for "menu" and did not think of the "dialog" synonym )

Last edited by catkin; 09-18-2010 at 10:19 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 9.10 does not start after kernel selection from Grub menu jiteshdoshi Linux - Hardware 1 06-28-2010 03:44 AM
[SOLVED] Framebuffer selection menu naveen76 Linux - Software 10 11-04-2009 04:19 PM
Not detecting usb keyboard to make selection in the boot menu. binoynicholas Linux - Hardware 6 08-30-2008 08:17 AM
Help with a basic script - adding a menu selection okorkie Programming 7 03-12-2007 04:45 PM
How to create multi-boot CD menu musicman_ace Linux - General 1 04-03-2006 02:12 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration