Sponsored Content
Top Forums Shell Programming and Scripting Code checking for all values in the same if statement. Post 46756 by oracle8 on Friday 23rd of January 2004 08:26:20 PM
Old 01-23-2004
I found it . There should be a space after and before the '=' in between the braces.
Damn Unix.Smilie Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking valid values in variable

I'm using the following in my script. if echo $cpuidle |/usr/bin/egrep ; then when I issue this statement it issues the value of the variable back to stdout which ends up in my output file. Is there a better way to write this? I'm using ksh on solaris 9. (3 Replies)
Discussion started by: MizzGail
3 Replies

2. Shell Programming and Scripting

Error code checking

I'm trying to create a directory from my Perl script. Only if the there was an error I want to let the user know about it. So if the folder exists is ok. This is what I think should work: `mkdir log 2>/dev/null`; if($? == 0 || $? == errorCodeForFileExists) { everyting is fine } else {... (3 Replies)
Discussion started by: jepombar
3 Replies

3. UNIX for Dummies Questions & Answers

checking parameter values passed to script

Hi, I will pass 3 parameters for a script.I have to check the file name and create a new file name with time stamp. the parameters which i'm passing are /dir/stg/filename.txt /dir/path/head.txt /dir/path/tail.txt Now i have to check filename like : if it is a.txt i have to create... (2 Replies)
Discussion started by: ammu
2 Replies

4. Shell Programming and Scripting

checking the return code

hi i have a file, i am reading line by line and checking a line contains a string , `grep "Change state" $LINE` if then echo "The line contains---" else echo "The line does not contains---" i need to check the return code , but i am getting an error ... (4 Replies)
Discussion started by: Satyak
4 Replies

5. Shell Programming and Scripting

Iterative statement to cut values from a line

Hi I am new to shell scripting and trying to get values from a text file, I have a text file with values seperated with "|". like aga|120220090525|120220090525|120220090525|120220090530 bab|120220090530|120220090530|120220090535|120220090535|120220090535... (4 Replies)
Discussion started by: mannepalli
4 Replies

6. Shell Programming and Scripting

SH if statement using FLOAT values

Today I spent longer than I'd like to admit figuring out how to write a Bourne shell IF statement that tests a FLOAT value before executing a block of statements. Here's the solution I found, which invokes bc. Hope this will come in handy for someone: value = testval = if then body... (5 Replies)
Discussion started by: sjepsen
5 Replies

7. Shell Programming and Scripting

Checking the Column values in a file.

Hi All, I have a file that has ~2.9Millions lines with 32 columns respectively. The columns numbers 23,27 are the primary Keys for the file. The fields are delimited by TAB. I need to check the condition If Column number: 20 is NOT NULL Column number: 21 is not 0 Column number: 22 is... (7 Replies)
Discussion started by: filter
7 Replies

8. Shell Programming and Scripting

code checking

i was just wondering how would you check , beside the lock method, if an instance of another code is already running and if it is then output a message to the user saying the program is already running and exit!! the code is in BOURNE SHELLL!!! thanks in advance!! (3 Replies)
Discussion started by: bshell_1214
3 Replies

9. Shell Programming and Scripting

Checking for duplicate code

I have a short line of code that checks very rudimentary for duplicate code: sort myfile.cpp | uniq -c | grep -v "^.*1 " | grep -v "}" It sorts the file, counts occurrences of each line, removes single occurrences and removes the ubiquitous closing brace. The language is C++, but is easily... (3 Replies)
Discussion started by: figaro
3 Replies

10. Shell Programming and Scripting

Pass values to case statement in a function korn shell

I'm in the process of writng a function that consists of a case statement is there a way of calling the function and passing a value to it? ie function1 () { case opt1 do ..... opt2 do..... esac } function opt1 I'm aware the syntax is not correct, but you get the general idea. (1 Reply)
Discussion started by: squrcles
1 Replies
PMS(4)							   BSD Kernel Interfaces Manual 						    PMS(4)

NAME
pms -- PS/2 auxiliary port mouse driver SYNOPSIS
pckbc* at isa? pms* at pckbc? wsmouse* at pms? options PMS_DISABLE_POWERHOOK options PMS_SYNAPTICS_TOUCHPAD options PMS_ELANTECH_TOUCHPAD DESCRIPTION
The pms driver provides an interface to PS/2 auxiliary port mice within the wscons(4) framework. Parent device in terms of the autoconfigu- ration framework is pckbc(4), the PC keyboard controller. ``pms'' is a generic driver which supports mice using common variants of the PS/2 protocol, including wheel mice of the ``IntelliMouse'' breed. Wheel movements are mapped to a third (z-) axis. The driver is believed to work with both 3-button and 5-button mice with scroll wheels. Mice which use other protocol extensions are not currently supported, but might be if protocol documentation could be found. Mouse related data are accessed by wsmouse(4) devices. The pms driver has been updated to attempt to renegotiate mouse protocol after seeing suspicious or defective mouse protocol packets, or unusual delays in the middle of a packet; this should improve the chances that a mouse will recover after being switched away or reset (for instance, by a console switch). The PMS_DISABLE_POWERHOOK kernel option disables PS/2 reset on resume. In addition, the pms driver supports the ``Synaptics'' and ``Elantech'' touchpads in native mode, enabled with the PMS_SYNAPTICS_TOUCHPAD and PMS_ELANTECH_TOUCHPAD kernel options. This allows the driver to take advantage of extra features available on Synaptics and Elantech Touch- pads. The following sysctl(8) variables control behavior of Synaptics touchpads: hw.synaptics.up_down_emulation If the touchpad reports the existence of Up/Down buttons, this value determines if they should be reported as button 4 and 5 events or if they should be used to emulate some other event. When set to 0, report Up/Down events as buttons 4 and 5. When set to 1, the Up and Down buttons are both mapped to the middle button. When set to 2 (default), the Up and Down buttons are used for Z-axis emulation, which more closely resembles how mouse wheels operate. hw.synaptics.up_down_motion_delta When the Up/Down buttons are used for Z-axis emulation, this value specifies the emulated delta-Z value per click. hw.synaptics.gesture_move Gestures will not be recognised if the finger moves by more than this amount between taps. hw.synaptics.gesture_length Gestures will not be recognised if the number of packets (at 80 packets per second) between taps exceeds this value. hw.synaptics.edge_left hw.synaptics.edge_right hw.synaptics.edge_top hw.synaptics.edge_bottom These values define a border around the touchpad which will be used for edge motion emulation during a drag gesture. If a drag gesture is in progress and the finger moves into this border, the driver will behave as if the finger continues to move in the same direction beyond the edge of the touchpad. hw.synaptics.edge_motion_delta This specifies the pointer speed when edge motion is in effect. hw.synaptics.finger_high The driver will ignore new finger events until the reported pressure exceeds this value. hw.synaptics.finger_low The driver will assume a finger remains on the touchpad until the reported pressure drops below this value. hw.synaptics.two_fingers_emulation More recent touchpads can report the presence of more than one finger on the pad. This value determines how such events are used. If set to 0 (default), two-finger events are ignored. If set to 1, two-finger events generate a right button click. If set to 2, two-finger events generate a middle button click. hw.synaptics.scale_x hw.synaptics.scale_y Scale factor used to divide movement deltas derived from Synaptics coordinates (0-6143) to yield more reasonable values (default 16). hw.synaptics.max_speed_x hw.synaptics.max_speed_y Limits pointer rate of change (after scaling) per reported movement event (default 32). hw.synaptics.movement_threshold Movements of less than this value (in Synaptics coordinates) are ignored (default 4). The following sysctl(8) variables control behavior of Elantech touchpads: hw.elantech.xy_precision_shift hw.elantech.z_precision_shift Increased values improve the accuracy of X, Y, and Z-axis reporting at the expense of slower mouse movement (default 2 for xy, and 3 for z). For Elantech touchpads, the Z-axis is emulated using two-finger Y-axis reporting. SEE ALSO
pckbc(4), ums(4), wsmouse(4) AUTHORS
The pms driver was originally written by Christopher G. Demetriou. The changes to merge the ``IntelliMouse'' protocol in, and reset the mouse in the event of protocol problems, were contributed by Peter Seebach. Special thanks to Ray Trent, at Synaptics, who contributed valu- able insight into how to identify bogus mouse data. The changes to add ``Synaptics'' pad support were by Ales Krenek, Kentaro A. Kurahone, and Steve C. Woodford. The changes to add ``Elantech'' pad support were by Jared D. McNeill. BUGS
It is possible for the driver to mistakenly negotiate the non-scroll-wheel protocol, after which it is unlikely to recover until the device is closed and reopened. The ``Elantech'' pad code only supports trackpads with firmware version 2.48 or above. BSD
December 13, 2008 BSD
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy