Sponsored Content
Top Forums Shell Programming and Scripting regular expressions using perl script Post 302272837 by Sgiri1 on Thursday 1st of January 2009 08:40:57 AM
Old 01-01-2009
hey thanks...so this will handle the case sensitivity is it?
thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl regular expressions...

I am writing script that will act like the 'comm' utility. My problem is when trying to read whether the user has entered -123 or -1 or -1...etc. I currently have: if(m/??/g){ print "Good.\n"; } So, this should check for all... (1 Reply)
Discussion started by: DrRo183
1 Replies

2. UNIX for Dummies Questions & Answers

Regular Expressions HELP - PERL

Hello, $line=USING (FILE '/TEST1/FILENAME'5000) I want to reterive the value between ' and ) which is 5000 here. i have tried out the following expressions ... Type 1 : $Var1=`sed -e 's/.*\' //' -e 's\).*$/' $line`; Type 2 : $Var1=`echo $line | awk -F"\'" '{print $2}' | awk -F"\\)"... (1 Reply)
Discussion started by: maxmave
1 Replies

3. Shell Programming and Scripting

Regular Expressions HELP - PERL

Hello, $line=USING (FILE '/TEST1/FILENAME'5000) I want to reterive the value between ' and ) which is 5000 here. i have tried out the following expressions ... Type 1 : $Var1=`sed -e 's/.*\' //' -e 's\).*$/' $line`; Type 2 : $Var1=`echo $line | awk -F"\'" '{print $2}' | awk -F"\\)"... (3 Replies)
Discussion started by: maxmave
3 Replies

4. Shell Programming and Scripting

perl regular expressions and field search

Hello guys/gals, i am sorry as this is probably very simply but i am slowly learning perl and need to convert some old korn shell scripts. I need to be able to search a file line by line but only match a string at particular location on that line, for example character 20-30. So my file... (4 Replies)
Discussion started by: dynamox
4 Replies

5. Shell Programming and Scripting

Regular expressions - Perl

Hello everybody, I am trying to connect from hp-ux to win 2003 using perl's Net::Telnet module. Seeing the examples in couple of web sites, I saw I have to declare a Prompt => Can somebody please tell me what my regular expression should be? The prompt after I log in is: ... login:... (1 Reply)
Discussion started by: whatever
1 Replies

6. Programming

Which language is best suited for regular expressions perl,python.ruby ?

Hello all, i am in a bit of dilema here. i dont know any thing about perl or python. only know a little bit of awk. now unable to take a decission as to which language to go for. my requirement is building a testing framework.suite which will execute ssytem comands remotely on unix... (2 Replies)
Discussion started by: achak01
2 Replies

7. Shell Programming and Scripting

Regular Expressions in K Shell Script

I need to write a K shell script to find full file names , line numbers and lines which have words meeting either of following 2 criterias - 1)words which are 6 to 8 character long and alphanumeric. 2)Minimum 8 characters, one upper case, one lower case letter, one of the special characters... (1 Reply)
Discussion started by: Rajpreet1985
1 Replies

8. Shell Programming and Scripting

Perl - Regular Expressions - Match complete word only

Hi Team, I have two strings like: xxx|yyy|Arizona Cardinals| Tell Cardinals | Cardinals bbb|Bell Earn, Jr | Bell Earn | Jayhawks | hawks I have a lookup file which has a set of strings. These need to be removed from above two strings Lookup file Contents: Bell Earn, Jr hawks... (2 Replies)
Discussion started by: forums123456
2 Replies

9. Shell Programming and Scripting

PERL Regular Expressions

im trying to extract some tags between and in a file..for eg..the file format is I want the and extracted from the file i.e the tags which is present b/w and I have the regex for extracting the tags from the whole file but how to specify my search within the and... (1 Reply)
Discussion started by: rajkrishna89
1 Replies

10. Shell Programming and Scripting

Regular expressions in tcsh script

Hi, I have a shell script in tcsh to which I pass an argument, the length of which can vary. The possible values of the argument are the letters -c,s,i,q,a. and also a combination of these letters. (e.g: cs,si,ca,iq,qa,csq,acs,csia ..etc). The order of the letters does not matter. My problem... (2 Replies)
Discussion started by: Vaisakh P
2 Replies
XtSetSensitive()														  XtSetSensitive()

Name
  XtSetSensitive - set the sensitivity state of a widget.

Synopsis
  void XtSetSensitive(w, sensitive)
	 Widget w;
	 Boolean sensitive;

Inputs
  w	    Specifies the widget.

  sensitive Specifies whether the widget should receive keyboard, pointer, and focus events.

Description
  XtSetSensitive()  sets  the  sensitivity  state of w.  If sensitive is False, then w and all of its descendants will become insensitive and
  will not have any KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, EnterNotify, LeaveNotify,  FocusIn,  or  FocusOut  events
  dispatched	       to	    them.	     If 	  sensitive	      is	  True, 	 and	      if	  w's
  XtNancestorSensitive resource is also True, then w and its children will be made sensitive again, except for any children that have explic-
  itly been made insensitive by calling XtSetSensitive() or by setting their XtNsensitive resource.

  See  the  "Background"  section below for more details on the algorithm followed by XtSetSensitive() and on how the sensitivity of a widget
  affects the sensitivity of its descendants.

Usage
  Many widgets will display themselves differently when they are insensitive.  A common approach is to draw themselves through a stipple mask
  so  that  they appear grayed-out.  XtSetSensitive() uses XtSetValues() when it sets the XtNsensitive and XtNancestorSensitive resources, so
  widgets can check for changes to these resources in their set_values() method and take the appropriate action.

  In an application, it is good style to make any widget insensitive if it does not currently make sense for the user to select it.   A  menu
  item labeled "Delete Selected Items", for example, should be insensitive if there are not any currently selected items.  A button that pops
  up a modal dialog box should be made insensitive while that dialog box is popped up, so that the user cannot attempt to pop it up again.

  You can test the sensitivity state of a widget by calling XtIsSensitive().

  Note that you can also set the sensitivity of a widget by setting the XtNsensitive resource directly.  It is better to  use  XtSetSensitive
  because this handles composite widgets correctly.  If you want a non-composite widget to be insensitive when it is created, you can specify
  False for XtNsensitive from a resource file or an argument list.  You can query the value of the  XtNancestorSensitive  resource,  but  you
  should never set it.

  Popup  shells  will  have  their  XtNancestorSensitive resource set to False if their parent was insensitive when they were created.	Since
  XtSetSensitive() on the parent will not modify the resource in the popup child, you should either be sure that you only create popup shells
  as children of sensitive widgets, or that you include a line like the following in your app-defaults file:

     *TransientShell.ancestorSensitive: True

Background
  Widget  sensitivity  is  controlled by the sensitive and ancestor_sensitive fields in the Core instance record.  XtNsensitive and XtNances-
  torSensitive are the resource names for these fields.  A widget can be insensitive because its sensitive field is False or because  one  of
  its ancestors is insensitive.  A widget can, but does not need to, distinguish these two cases visually.

  XtSetSensitive()	  first        calls	    XtSetValues()	 on	  the	    current	  widget       to	set	  the
  XtNsensitive resource to the value specified by sensitive.  If sensitive is False and the widget is a subclass  of  Composite,  XtSetSensi-
  tive()  recursively  propagates  the	new  value down the children tree by calling XtSetValues() on each child to set ancestor_sensitive to
  False.  If sensitive is True and the widget is a subclass of Composite and the widget's ancestor_sensitive field is True, then  XtSetSensi-
  tive()  sets	the  ancestor_sensitive  of each child to True and then recursively calls XtSetValues() on each normal descendant that is now
  sensitive to set ancestor_sensitive to True.

  XtSetSensitive() ensures that if a parent has either sensitive or ancestor_sensitive set to False, then all children	have  ancestor_sensi-
  tive set to False.

See Also
  XtGetValues(1), XtIsSensitive(1), XtSetValues(1).

Xt - Resource Management													  XtSetSensitive()
All times are GMT -4. The time now is 02:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy