Sponsored Content
Top Forums Shell Programming and Scripting A selection menu in a shell script Post 302789523 by ahamed101 on Wednesday 3rd of April 2013 08:19:31 PM
Old 04-03-2013
Didn't quite get the requirement.

--ahamed
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Menu help with array selection

Hi there all I got the following I got multiple arrays named for example STAT_AAAA STAT_AAAB STAT_AAAC STAT_AAAD Now what I want I have chosen an option in a menu to select 1 but I dont want to write for all the same thing so I made it a signle one now what I want is to get STAT_ and... (6 Replies)
Discussion started by: draco
6 Replies

2. Linux

Opt out of selection menu?

When I logon to my server with PuTTY I am forced into a selection menu with few options. How to I opt out of this menu to get to the home directory to view all of the files on the server? Thanks for the help. :o (1 Reply)
Discussion started by: ksirimarco
1 Replies

3. UNIX for Dummies Questions & Answers

Input A Menu Selection In A Variable

hey all, me again....having a problem with my code, where I essentially am trying to show a menu, have the user select an option (from 1 to 5), then display which selection they picked... #!/bin/bash # A LIST OF THE ERROR MESSAGES AND THE PROPER SYNTAX: error_0="Correct amount of... (1 Reply)
Discussion started by: SoVi3t
1 Replies

4. Shell Programming and Scripting

reprint the select menu after a selection

Hi, I am using a select in ksh for a script #!/bin/ksh FIRSTLIST='one two three four quit' PS3='Please select a number: ' select i in $FIRSTLIST ; do case $i in one) print 'this is one' ;; two) print 'this is 2' ;; three) print 'this is 3' ;; four) print... (7 Replies)
Discussion started by: omerzzz
7 Replies

5. Shell Programming and Scripting

Shell script menu

hi guys, how would you do the following? I have a menu with 5 options in my shell script: 1. Run function 1 against files 2. Run function 2 against files 3. Run function 3 against files 4. Run function 4 against files 5. Run function 5 against files I'd like to be able to run multiple... (10 Replies)
Discussion started by: rich@ardz
10 Replies

6. Shell Programming and Scripting

Menu using shell script

Hi, I need to have a shell script for the below need. 1. Menu with one heading and 4 options. 2. the heading and 4 options are taken from a file. File entry ====== Heading1|option1|option2|option3|option4| Heading2|option1|option2|option3|option4| 3. the user entries must be captured in... (9 Replies)
Discussion started by: umastinu
9 Replies

7. Shell Programming and Scripting

How to automate user selection options in shell script?

Hi There, I am trying to write a script which has to pick the prompted options by itself(i mean option to choose will be passed) here is real scenario i am trying to do. i have an executable(diagnos) which gets called in shell script, when the executable (diagnos) runs i get following as... (8 Replies)
Discussion started by: sairam_9191
8 Replies

8. Shell Programming and Scripting

Menu shell script help

Hi All, I have written a shell script that show menu driven option. My requirement is that in the menu driven option i want to select multiple choice. i.e if i want to select 1 or 1,2 or 1,2,3 or 2,3 etc .... Can some one help me in that My script. while true; do echo " " ... (8 Replies)
Discussion started by: Nawrajesh
8 Replies

9. UNIX for Dummies Questions & Answers

Dynamic menu selection? Help..

Hi guys, i would like to create a program that allow user to show the information of certain thing such as network card. I would like the menu to be dynamic, for example: my computer system have 2 network card inserted at the moment, therefore the menu will have 2 choice for the user. eth0... (12 Replies)
Discussion started by: malfolozy
12 Replies

10. Shell Programming and Scripting

Dialog --menu limitation for the entries for selection

Hi Guys, Please pardon me if this is a silly question, but I have tried to find an answer and going through the man page and failed to get one. I have created a menu driven script with dialog --menu option. Everything is working as expeted, however, it seems that if I have more than 10... (1 Reply)
Discussion started by: ww889
1 Replies
XSetSelectionOwner()													      XSetSelectionOwner()

Name
  XSetSelectionOwner - set the owner of a selection.

Synopsis
  XSetSelectionOwner(display, selection, owner, time)
	Display *display;
	Atom selection;
	Window owner;
	Time time;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  selection Specifies the selection atom.  Predefined atoms are XA_PRIMARY and XA_SECONDARY.

  owner     Specifies the desired owner of the specified selection atom.  This value is either a window ID or None.

  time	    Specifies  the  time  when	the selection should take place.  Pass either a timestamp, expressed in milliseconds, or the constant
	    CurrentTime.

Description
  XSetSelectionOwner() sets the owner and last-change time of a selection property.  This should be called by an  application  that  supports
  cutting and pasting between windows (or at least cutting), when the user has made a selection of any kind of text, graphics, or data.  This
  makes the information available so that other applications can request the data from the new	selection  owner  using  XConvertSelection(),
  which generates a SelectionRequest event specifying the desired type and format of the data.	Then the selection owner sends a SelectionNo-
  tify using XSendEvent(), which notes that the information is stored in the selection property in the desired format or  indicates  that  it
  couldn't do the conversion to the desired type.

  If  owner  is specified as None, then this client is giving up ownership voluntarily.  Otherwise, the new owner is the client executing the
  request.

  If the new selection owner is not the same client as the old owner, and the new owner is a window, then the old owner is sent a  Selection-
  Clear event.	This indicates to the old owner that the selection should be unhighlighted.

  If the selection owner window is later destroyed, the owner of the selection automatically reverts to None.

  The value you pass to the time argument must be no earlier than the last-change time of the specified selection, and no later than the cur-
  rent time, or the selection is not affected.	The new last-change time recorded is the specified time, with  CurrentTime  replaced  by  the
  current server time.	If the X server reverts a selection owner to None, the last-change time is not affected.

  For more information on selections, see Volume One, Chapter 12, Interclient Communication.

Errors
  BadAtom
  BadWindow

See Also
  XConvertSelection(), XGetSelectionOwner().

Xlib - Selections													      XSetSelectionOwner()
All times are GMT -4. The time now is 06:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy