Sponsored Content
Top Forums Shell Programming and Scripting Can't interpret variable in if statement Post 302208964 by pramodmc on Wednesday 25th of June 2008 12:09:12 PM
Old 06-25-2008
typeset -i ALL_EVENTS
Placing this before the script should resolve the issue
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using variable in case statement

I want to do this: Ex 1: case $answer in 1|2|3|4|5) echo $answer;; x) break;; *) echo "Invalid selection. Try again.";; esac But I need the part "1|2|3|4|5" to be fetched from a variable, like so: Ex 2: case $answer in $cases) echo $answer;; x) break;; *) echo "Invalid... (2 Replies)
Discussion started by: fialia
2 Replies

2. UNIX for Dummies Questions & Answers

Perl / Interpret Unix If statement

Hi all, I am a newbie, so please let me know if there is a better way to do this. I coded a perl script, that scans a Unix script and picks out certain strings (strings that precede ".log"). However I want to limit the strings it picks up based on the "If statements" in the unix script. ... (0 Replies)
Discussion started by: syera123
0 Replies

3. Shell Programming and Scripting

Bash: evaluating $? variable (if statement)

Hello, i'm unable to write a correct if... statement to evaluate the $? variable. Could anybody send to me an example? for example, this lines of code didn't work... if ; then etc etc if ; then etc etc Thank you in advanced. (5 Replies)
Discussion started by: aristegui
5 Replies

4. Shell Programming and Scripting

Ksh riddle: interpret variable two times?

exam is a ksh script. In command line I enter: exam 3 param_2 param_3 param_4. In exam how can I get the value of the parameter which position is specified by the first argument. Simply doing this DOES NOT work: offset=$1 value=$$offset can you figure out any possible way to interpret a... (5 Replies)
Discussion started by: i27oak
5 Replies

5. Shell Programming and Scripting

Assigning Variable to AWK statement

Hi, The following command runs on in the Korn shell prompt. however i want to output the value of this to a variable. Can anyone provide a solution? echo 'ABC,DEF,"G,HI,J",KLM,"MNi,O"'| awk -F "\"" '{for(i=1;i<=NF;i++){if(i%2)gsub("\,","~^~",$i)}}1' (2 Replies)
Discussion started by: ladarlsan
2 Replies

6. Shell Programming and Scripting

How can i assign an select statement into a variable?

I am trying to assign an select statement into a variable. Can someone hel me with this. example : a='select * from dual' echo $a should give me select * from dual But this is not working. I trying with \ before * and quotes too. (1 Reply)
Discussion started by: rdhanek
1 Replies

7. Shell Programming and Scripting

Select variable within a if statement

i want to select a variable created and use it in a if statement, but not getting the desired results LINE='device for 0101a01: lpd://172.25.41.111:515' prt=`echo $LINE | awk '{print $3 }' | cut -c 1-7` echo $prt My if statement to select just what i want.. IFS=$":" while read prt... (11 Replies)
Discussion started by: ggoliath
11 Replies

8. Shell Programming and Scripting

if then else; no variable match but statement executes anyway.

My first then statement is executing even though there is no match between the variables. each subsequent if then statement is also executing. Why do they execute when there is no match in the dates? yr=`date +%y` date1=12-31-$yr date=`date +%m-%d-%y` set -vx if ; ... (6 Replies)
Discussion started by: bash_in_my_head
6 Replies

9. Shell Programming and Scripting

Variable on If Statement

Hi, I am tasked to modify soem script and I come accross a line which I dont fully understand. I tried searching online but I couldnt get a good explanation on it. Here it the part of the code: PAY_RT=`cat $TEMPFILE | cut -f2 -d","` if ; then PAY_RT=R fi What is... (3 Replies)
Discussion started by: The One
3 Replies

10. Shell Programming and Scripting

Variable IF statement in awk

I have multiple requirements to run data extracts (with the same basic requriement / resulsts) however the parameters of the extracts change with each request. To help make life easier I am writing a script where the parameters for the specific request are set at the start and then used as needed.... (6 Replies)
Discussion started by: meike
6 Replies
SoQtKeyboard(3) 						       SoQt							   SoQtKeyboard(3)

NAME
SoQtKeyboard - The SoQtKeyboard class is the keyboard input device abstraction. The SoQtKeyboard class is the glue between native keyboard handling and keyboard interaction with the Inventor scenegraph. SYNOPSIS
#include <Inventor/Qt/devices/SoQtKeyboard.h> Inherits SoQtDevice. Public Types enum Events { KEY_PRESS = 0x01, KEY_RELEASE = 0x02, ALL_EVENTS = KEY_PRESS | KEY_RELEASE } Public Member Functions SoQtKeyboard (int eventmask=ALL_EVENTS) virtual ~SoQtKeyboard (void) virtual void enable (QWidget *widget, SoQtEventHandler *handler, void *closure) virtual void disable (QWidget *widget, SoQtEventHandler *handler, void *closure) virtual const SoEvent * translateEvent (QEvent *event) Friends class SoQtKeyboardP class SoGuiKeyboardP Detailed Description The SoQtKeyboard class is the keyboard input device abstraction. The SoQtKeyboard class is the glue between native keyboard handling and keyboard interaction with the Inventor scenegraph. All components derived from the SoQtRenderArea have got an SoQtKeyboard device attached by default. Member Enumeration Documentation enum SoQtKeyboard::Events Enumeration over supported event types. Enumerator: KEY_PRESS Maskbit for a keyboard button press event. KEY_RELEASE Maskbit for a keyboard button release event. ALL_EVENTS Combined bitmask for all possible events. Constructor &; Destructor Documentation SoQtKeyboard::SoQtKeyboard (intmask = ALL_EVENTS) Constructor. The mask specifies which keyboard-related events to handle. Others will just be ignored. SoQtKeyboard::~SoQtKeyboard (void) [virtual] Destructor. Member Function Documentation void SoQtKeyboard::enable (QWidget *widget, SoQtEventHandler *handler, void *closure) [virtual] This method will enable the device for the widget. handler is invoked with the closure argument when an event occur in widget. Implements SoQtDevice. void SoQtKeyboard::disable (QWidget *widget, SoQtEventHandler *handler, void *closure) [virtual] This method will disable the handler for the device. Implements SoQtDevice. const SoEvent * SoQtKeyboard::translateEvent (QEvent *event) [virtual] This method translates from native events to Open Inventor SoEvent events. Implements SoQtDevice. References SoQtDevice::getLastEventPosition(), KEY_PRESS, KEY_RELEASE, and SoQtDevice::setEventPosition(). Author Generated automatically by Doxygen for SoQt from the source code. Version 1.5.0 Sun Dec 11 2011 SoQtKeyboard(3)
All times are GMT -4. The time now is 07:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy