Sponsored Content
Top Forums Shell Programming and Scripting Cannot get terminal application to launch with a graphical launcher when successful in terminal Post 302966745 by RudiC on Tuesday 16th of February 2016 05:52:07 AM
Old 02-16-2016
select will take ANY list and turn it into a menu:
Code:
PS3="Enter Value X: "
select X in A B C D E F; do echo $X; done
1) A
2) B
3) C
4) D
5) E
6) F
Enter Value X:

Then, add a case ... esac construct ...
These 2 Users Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

Script to launch terminal window?

Hi, I am a newbie here. Trying to find a way of writing a script to launch multiple terminal or console windows on solaris 9. I used to be able to do this using cmdtool on older versions of solaris and it was even possible to configure the size and screen position of the window and the title. ... (5 Replies)
Discussion started by: omerta
5 Replies

2. Shell Programming and Scripting

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In... (3 Replies)
Discussion started by: JFraser1
3 Replies

3. OS X (Apple)

Need help writing an Applescript to launch a specific Terminal Command...

I developed a script in Lingon (which is an automated script editor developed for OS X) that is used to automatically restart programs only if they crash. The script itself does just that, but I only want it to load if I'm going to use the specific application that it's designed to protect. In the... (2 Replies)
Discussion started by: JFraser1
2 Replies

4. Programming

Redirecting Terminal to Local Application!

i wanted to execute some terminal commands on local linux, parse their output and display it to the user, i checked netcat source code but i couldnt understance it since im new to c (and linux at the same time). so i was wondering if there is away to run an instance of terminal hidden, read and... (15 Replies)
Discussion started by: JonhyM
15 Replies

5. Shell Programming and Scripting

How do I launch a command on an existing terminal in unix using PERL

Hello, I have a PERL-TK based GUI from which I want to launch a command on an existing UNIX terminal (this is also the parent terminal for this perl based gui window). The command I want to launch is interactive (there is no intention to interact with that command from the same PERL gui i.e. no... (2 Replies)
Discussion started by: AnuragJindal
2 Replies

6. OS X (Apple)

Can't launch x11 remotely from terminal

After I installed OS X Lion I haven't been able to launch x11 remotely (using ssh) from Terminal. It works fine locally, and also remotely directly from the Xterm. I log in to the unix server at my university from the terminal like this: ssh -l -X login@host.com This used to launch... (1 Reply)
Discussion started by: gnyrf
1 Replies

7. Red Hat

Not able to see the terminal icon in the applications menu to launch the command prompt in Centos

After installing centos iam not able to see the terminal icon in the applications menu to launch the command prompt in Centos. However iam able to see the Open Terminal menu, when i right click and it is not working. let me know what are the things i need to check.:b: (1 Reply)
Discussion started by: Kesavan
1 Replies

8. UNIX for Dummies Questions & Answers

pbpaste to application in terminal

Is it possible to execute a pbpaste command to an application or current application in focus? Thanks (0 Replies)
Discussion started by: fhill2
0 Replies

9. UNIX for Dummies Questions & Answers

Routing command to another graphical terminal

So, I'm in a graphical terminal (xfce4-terminal) and I was wondering, would there be a way to type a command, and it run in a new terminal window?? An example would be like, say that I want to open a .txt file, but I want it in a different window, instead of the one that I'm currently using because... (1 Reply)
Discussion started by: Huitzilopochtli
1 Replies

10. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
ckitem(1)							   User Commands							 ckitem(1)

NAME
ckitem, erritem, helpitem - build a menu; prompt for and return a menu item SYNOPSIS
ckitem [-Q] [-W width] [-uno] [-f filename] [-l label] [ [-i invis] [,...]] [-m max] [-d default] [-h help] [-e error] [-p prompt] [ -k pid [-s signal]] [ choice [...]] /usr/sadm/bin/erritem [-W width] [-e error] [ choice [..]] /usr/sadm/bin/helpitem [-W width] [-h help] [ choice [..]] DESCRIPTION
The ckitem utility builds a menu and prompts the user to choose one item from a menu of items. It then verifies the response. Options for this command define, among other things, a prompt message whose response will be a menu item, text for help and error messages, and a default value (which will be returned if the user responds with a carriage return). By default, the menu is formatted so that each item is prepended by a number and is printed in columns across the terminal. Column length is determined by the longest choice. Items are alphabetized. All messages are limited in length to 70 characters and are formatted automatically. Any white space used in the definition (including new- line) is stripped. The -W option cancels the automatic formatting. When a tilde is placed at the beginning or end of a message definition, the default text will be inserted at that point, allowing both custom text and the default text to be displayed. If the prompt, help or error message is not defined, the default message (as defined under NOTES) will be displayed. Two visual tool modules are linked to the ckitem command. They are erritem (which formats and displays an error message) and helpitem (which formats and displays a help message). These modules should be used in conjunction with FML objects. In this instance, the FML object defines the prompt. When choice is defined in these modules, the messages will describe the available menu choice (or choices). OPTIONS
The following options are supported: -d default Define the default value as default. The default is not validated and so does not have to meet any criteria. -e error Define the error message as error. -f filename Define a file, filename, which contains a list of menu items to be displayed. (The format of this file is: token<tab>description. Lines beginning with a pound sign (#) are designated as comments and ignored.) -h help Define the help messages as help. -i invis Define invisible menu choices (those which will not be printed in the menu). (For example, ``all'' used as an invisible choice would mean it is a legal option but does not appear in the menu. Any number of invisible choices may be defined.) Invisible choices should be made known to a user either in the prompt or in a help message. -k pid Specify that the process ID pid is to be sent a signal if the user chooses to abort. -l label Define a label, label, to print above the menu. -m max Define the maximum number of menu choices that the user can choose. The default is 1. -n Specify that menu items should not be displayed in alphabetical order. -o Specify that only one menu token will be returned. -p prompt Define the prompt message as prompt. -Q Specify that quit will not be allowed as a valid response. -s signal Specify that process ID pid defined with the -k option is to be sent signal signal when quit is chosen. If no signal is specified, SIGTERM is used. -u Specify that menu items should be displayed as an unnumbered list. -W width Specify that prompt, help and error messages will be formatted to a line length of width. OPERANDS
The following operand is supported: choice Define menu items. Items should be separated by white space or newline. EXIT STATUS
The following exit values are returned: 0 Successful execution. 1 EOF on input, or negative width on -W option, or inability to open file on -f option, or usage error. 3 User termination (quit). 4 No choices from which to choose. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) NOTES
The user may input the number of the menu item if choices are numbered or as much of the string required for a unique identification of the item. Long menus are paged with 10 items per page. When menu entries are defined both in a file (by using the -f option) and also on the command line, they are usually combined alphabeti- cally. However, if the -n option is used to suppress alphabetical ordering, then the entries defined in the file are shown first, followed by the options defined on the command line. The default prompt for ckitem is: Enter selection [?,??,q]: One question mark will give a help message and then redisplay the prompt. Two question marks will give a help message and then redisplay the menu label, the menu and the prompt. The default error message if you typed a number is: ERROR: Bad numeric choice specification The default error message if you typed a string is: ERROR: Entry does not match available menu selection. Enter the number of the menu item you wish to select, the token which is associated with the menu item, or a partial string which uniquely identifies the token for the menu item. Enter ?? to reprint the menu. The default help message is: Enter the number of the menu item you wish to select, the token which is associated with the menu item, or a partial string which uniquely identifies the token for the menu item. Enter ? to reprint the menu. When the quit option is chosen (and allowed), q is returned along with the return code 3. SunOS 5.10 14 Sep 1992 ckitem(1)
All times are GMT -4. The time now is 05:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy