Sponsored Content
Full Discussion: accept user input?
Top Forums UNIX for Dummies Questions & Answers accept user input? Post 302310752 by sivakumar.rj on Sunday 26th of April 2009 11:59:05 PM
Old 04-27-2009
the input can also be read by giving the following

value=$1

or read $1
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Accept user input - only numbers

I have a situation where I want the user to enter only numbers in response to a READ command. I have some validation to restrict the number to be between 1 and 12, but if the user type in some characters the script echoes some error message and goes to the next command. Below is a snippet of the... (1 Reply)
Discussion started by: pvar
1 Replies

2. Shell Programming and Scripting

Accept input parameters

Dear All, I got a table creation file in a standard format. I need to accept parameters from the user & then based on the input change the data in the file. For. eg. i will accept the database name, dbspace name & user name from the user and accordingly change the same in the table creation... (2 Replies)
Discussion started by: lloydnwo
2 Replies

3. Shell Programming and Scripting

How to prompt for input & accept input in ONE line

hi, am a new learner to shell programming. i have a script which will prompt for user to key in their name & display their name afterwards. script ===== echo "Pls enter your name:" read name echo "Your name is $name." output ===== Pls enter your name: Bob Your name is Bob. what... (2 Replies)
Discussion started by: newbie168
2 Replies

4. UNIX for Dummies Questions & Answers

Command to accept input

I am trying to write a one line command for Oracle grid control. I am using a semi-colon to separate the commands. But, I am having a problem with a shell script accepting input. Wondering if you can help. Here is what I am trying to do: (PGPRD5432)@prd01:/> cd /export/home/postgres ##... (3 Replies)
Discussion started by: rexmabry
3 Replies

5. Shell Programming and Scripting

How to accept multiple input in a same variable

Hi All, I am trying to write a script in which I need to accept multiple value in the same variable. The case Is that I have put a FOR loop and inside the FOR loop I am accepting a variable value. And I require all the values which gets inputted in the variable. To be... (5 Replies)
Discussion started by: rahulmittal87
5 Replies

6. Shell Programming and Scripting

SQL PLUS Command 'ACCEPT' is not waiting for user input with sh shell script

Dear All, The sqlplus 'Accept' command is not waiting for user input when I include the command within a shell script. Note: The 'Accept' command is working fine if I execute it in a SQLPLUS Prompt. Please fins the below sample script which i tried. SCRIPT: -------- #!... (4 Replies)
Discussion started by: little_wonder
4 Replies

7. UNIX for Advanced & Expert Users

Gedit semi-frozen/hangs; does not accept keyboard/mouse input

I have a very weird problem with the gedit 2.30.3 text editor on GNOME 2.30.2 (Ubuntu Linux 10.04 LTS): Any and all mouse clicks and key-presses into the gedit window are summarily ignored. When I say the gedit window, I mean the gedit window proper, the window contents, not the decoration of... (1 Reply)
Discussion started by: ropers
1 Replies

8. Programming

How to accept multiple lines input from User in C?

Hi I want to accept multiple lines input with spaces from User and i have a working code like this. char sRes; char sReq; printf("Please enter request:"); scanf("%",sReq); /* Accept the input from user */ printf("\nPlease enter response:"); scanf("%",sRes); but the... (4 Replies)
Discussion started by: AAKhan
4 Replies

9. Shell Programming and Scripting

accept input on an echo output

echo (some info) read? <&1(not working for me) (1 Reply)
Discussion started by: robin_simple
1 Replies

10. Shell Programming and Scripting

Shell script to accept user input on the fly

I want a shell script that accepts user input simultaneously when performing other tasks. Example: A shell script should echo some messages on the console and when the user presses some keys it should respond to that action. say, when user presses the key A - more information should be printed... (2 Replies)
Discussion started by: Arun_Linux
2 Replies
QIMEvent(3qt)															     QIMEvent(3qt)

NAME
QIMEvent - Parameters for input method events SYNOPSIS
#include <qevent.h> Inherits QEvent. Public Members QIMEvent ( Type type, const QString & text, int cursorPosition ) const QString & text () const int cursorPos () const bool isAccepted () const void accept () void ignore () int selectionLength () const DESCRIPTION
The QIMEvent class provides parameters for input method events. Input method events are sent to widgets when an input method is used to enter text into a widget. Input methods are widely used to enter text in Asian and other complex languages. The events are of interest to widgets that accept keyboard input and want to be able to correctly handle complex languages. Text input in such languages is usually a three step process. <ol type=1> 1 Starting to Compose When the user presses the first key on a keyboard an input context is created. This input context will contain a string with the typed characters. 2 Composing With every new key pressed, the input method will try to create a matching string for the text typed so far. While the input context is active, the user can only move the cursor inside the string belonging to this input context. 3 Completing At some point, e.g. when the user presses the Spacebar, they get to this stage, where they can choose from a number of strings that match the text they have typed so far. The user can press Enter to confirm their choice or Escape to cancel the input; in either case the input context will be closed. Note that the particular key presses used for a given input context may differ from those we've mentioned here, i.e. they may not be Spacebar, Enter and Escape. These three stages are represented by three different types of events. The IMStartEvent, IMComposeEvent and IMEndEvent. When a new input context is created, an IMStartEvent will be sent to the widget and delivered to the QWidget::imStartEvent() function. The widget can then update internal data structures to reflect this. After this, an IMComposeEvent will be sent to the widget for every key the user presses. It will contain the current composition string the widget has to show and the current cursor position within the composition string. This string is temporary and can change with every key the user types, so the widget will need to store the state before the composition started (the state it had when it received the IMStartEvent). IMComposeEvents will be delivered to the QWidget::imComposeEvent() function. Usually, widgets try to mark the part of the text that is part of the current composition in a way that is visible to the user. A commonly used visual cue is to use a dotted underline. After the user has selected the final string, an IMEndEvent will be sent to the widget. The event contains the final string the user selected, and could be empty if they cancelled the composition. This string should be accepted as the final text the user entered, and the intermediate composition string should be cleared. These events are delivered to QWidget::imEndEvent(). If the user clicks another widget, taking the focus out of the widget where the composition is taking place the IMEndEvent will be sent and the string it holds will be the result of the composition up to that point (which may be an empty string). See also Event Classes. MEMBER FUNCTION DOCUMENTATION
QIMEvent::QIMEvent ( Type type, const QString & text, int cursorPosition ) Constructs a new QIMEvent with the accept flag set to FALSE. type can be one of QEvent::IMStartEvent, QEvent::IMComposeEvent or QEvent::IMEndEvent. text contains the current compostion string and cursorPosition the current position of the cursor inside text. void QIMEvent::accept () Sets the accept flag of the input method event object. Setting the accept parameter indicates that the receiver of the event processed the input method event. The accept flag is not set by default. See also ignore(). int QIMEvent::cursorPos () const Returns the current cursor position inside the composition string. Will return 0 for IMStartEvent and IMEndEvent. void QIMEvent::ignore () Clears the accept flag parameter of the input method event object. Clearing the accept parameter indicates that the event receiver does not want the input method event. The accept flag is cleared by default. See also accept(). bool QIMEvent::isAccepted () const Returns TRUE if the receiver of the event processed the event; otherwise returns FALSE. int QIMEvent::selectionLength () const Returns the number of characters in the composition string ( starting at cursorPos() ) that should be marked as selected by the input widget receiving the event. Will return 0 for IMStartEvent and IMEndEvent. const QString &; QIMEvent::text () const Returns the composition text. This is a null string for an IMStartEvent, and contains the final accepted string (which may be empty) in the IMEndEvent. SEE ALSO
http://doc.trolltech.com/qimevent.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qimevent.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QIMEvent(3qt)
All times are GMT -4. The time now is 05:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy