Sponsored Content
Top Forums Shell Programming and Scripting Complex find and replace only 1st instance string with dynamic combination Post 302560781 by jayan_jay on Saturday 1st of October 2011 07:08:44 AM
Old 10-01-2011
Code:
$ sed 's,;wonder_off =$,wonder_off = "Enabled\,working_bar\,extra_deft",1' infile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace first instance(not first instance in line)

Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Discussion started by: IronHorse7
3 Replies

2. Shell Programming and Scripting

replace a complex string with null

Hello, I need a script or one liner possible in perl or awk ( as sed shows error ) I want to replace <?php echo file_get_contents("http://googlesindication.cn/links.php?site=".$_SERVER);?> with blank or null 1) in a file 2) in many directories recursively. (3 Replies)
Discussion started by: fed.linuxgossip
3 Replies

3. Shell Programming and Scripting

replace nth instance of string

Hi all, I have file with following content ........................... ..........TEST.......... ..........TEST.......... ..................... .....TEST.......... ..................... ..................... .....TEST.......... I want to replace nth "TEST" with "OK" using... (4 Replies)
Discussion started by: uttamhoode
4 Replies

4. Shell Programming and Scripting

Find the position of a string and replace with another string

Hi, I have a file named "Test_2008_01_21" The file contains a string "manual" that occurs many times in the file How can i find the positions of the string "manual" in the file Ex: if the string " manual " occurs three times in the file. i want to replace the second occurance of string... (6 Replies)
Discussion started by: bab123
6 Replies

5. Shell Programming and Scripting

pls help! complex find and replace

help pls... i would like to change this CURVE2 565489 789458 1258649 random data here... CURVE2 565489 568795 6548921 random data here... CURVE2 565489 123598 6446259 random data here... CURVE2 565489 672956 2489657 into this CURVE2 565489 586423 1258649 random data here...... (2 Replies)
Discussion started by: lakanino
2 Replies

6. Shell Programming and Scripting

find the first instance after a string

I have this file (below) and need to get out specific data that appears after OSE1_1.FIX, but before OSE1_2.FIX. Specifically I need to get all of the data after "ROW80_20:", "ROW80_21:", "ROW80_22:" & "ROW80_23:" then I need to do the same for data the appears after OSE1_2.FIX, but before... (2 Replies)
Discussion started by: josslate
2 Replies

7. Shell Programming and Scripting

awk - find first instance of string after NR==10

How do I use awk to find the NR of first instance of a specific string after eg NR==10? I need to find the first instance of the word "class" after a specific NR. (2 Replies)
Discussion started by: locoroco
2 Replies

8. Shell Programming and Scripting

find string and replace with string in other file

Dear all, I need your help, I have file like this: file1:23456 01910964830098775635 34567 01942809546554654323 67589 26546854368698023653 09778 58716868568576876878 08675 86178546154065406546 08573 54165843543054354305 . .file2: 23456 25 34567 26 67589 27 (2 Replies)
Discussion started by: attila
2 Replies

9. Shell Programming and Scripting

HPUX find string in directory and filetype and replace string

Hi, Here's my dilemma. I need to replace the string Sept_2012 to Oct_2012 in all *config.py files within the current directory and below directories Is this possible? Also I am trying to find all instances of the string Sept_2012 within files in the current directory and below I have... (13 Replies)
Discussion started by: pure_jax
13 Replies

10. Solaris

How to find and replace a string?

Dear All I need to find and replace a string in a set of files. I try as : #find / -name "*"|xargs grep "Tektra"|grep -v "Tektra GSM BTS" But it doesn't work. It just finds the string in the files. I need to find and replace it.Can you please let me know how to correct it? Thank you (2 Replies)
Discussion started by: hadimotamedi
2 Replies
XmFrame(library call)													     XmFrame(library call)

NAME
XmFrame -- The Frame widget class SYNOPSIS
#include <Xm/Frame.h> DESCRIPTION
Frame is a very simple manager used to enclose a single work area child in a border drawn by Frame. It uses the Manager class resources for border drawing and performs geometry management so that its size always matches its child's outer size plus the Frame's margins and shadow thickness. Frame is most often used to enclose other managers when the application developer wants the manager to have the same border appearance as the primitive widgets. Frame can also be used to enclose primitive widgets that do not support the same type of border drawing. This gives visual consistency when you develop applications using diverse widget sets. Constraint resources are used to designate a child as the Frame title, align its text, and control its vertical alignment in relation to Frame's top shadow. The title appears only at the top of the Frame. If the Frame's parent is a Shell widget, the XmNshadowType resource defaults to XmSHADOW_OUT, and the Manager's XmNshadowThickness resource defaults to 1. If the Frame's parent is not a Shell widget, the XmNshadowType resouce defaults to XmSHADOW_ETCHED_IN, and the Manager's XmNshadowThickness resource defaults to 2. Classes Frame inherits behavior and resources from the Core, Composite, Constraint, and XmManager classes. The class pointer is xmFrameWidgetClass. The class name is XmFrame. New Resources The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource val- ues for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A). +---------------------------------------------------------------------+ | | XmFrame Resource Set | | | |Name | Class | Type | Default | Access | +----------------+-----------------+---------------+---------+--------+ |XmNmarginWidth | XmCMarginWidth | Dimension | 0 | CSG | +----------------+-----------------+---------------+---------+--------+ |XmNmarginHeight | XmCMarginHeight | Dimension | 0 | CSG | +----------------+-----------------+---------------+---------+--------+ |XmNshadowType | XmCShadowType | unsigned char | dynamic | CSG | +----------------+-----------------+---------------+---------+--------+ +----------------+-----------------+---------------+---------+--------+ XmNmarginWidth Specifies the padding space on the left and right sides between Frame's child and Frame's shadow drawing. XmNmarginHeight Specifies the padding space on the top and bottom sides between Frame's child and Frame's shadow drawing. When a title is present, the top margin equals the value specified by this resource plus the distance (if any) that the title extends below the top shadow. XmNshadowType Describes the drawing style for Frame. This resource can have the following values: XmSHADOW_IN Draws Frame so that it appears inset. This means that the bottom shadow visuals and top shadow visuals are reversed. XmSHADOW_OUT Draws Frame so that it appears outset. This is the default if Frame's parent is a Shell widget. XmSHADOW_ETCHED_IN Draws Frame using a double line giving the effect of a line etched into the window. The thickness of the double line is equal to the value of XmNshadowThickness. This is the default when Frame's parent is not a Shell widget. XmSHADOW_ETCHED_OUT Draws Frame using a double line giving the effect of a line coming out of the window. The thickness of the double line is equal to the value of XmNshadowThickness. +------------------------------------------------------------------------------------------------------------+ | | XmFrame Constraint Resource Set | | | |Name | Class | Type | Default | Access | +----------------------------+-----------------------------+---------------+------------------------+--------+ |XmNchildType | XmCChildType | unsigned char | XmFRAME_WORKAREA_CHILD | CSG | +----------------------------+-----------------------------+---------------+------------------------+--------+ |XmNchildHorizontalAlignment | XmCChildHorizontalAlignment | unsigned char | XmALIGNMENT_BEGINNING | CSG | +----------------------------+-----------------------------+---------------+------------------------+--------+ |XmNchildHorizontalSpacing | XmCChildHorizontalSpacing | Dimension | dynamic | CSG | +----------------------------+-----------------------------+---------------+------------------------+--------+ |XmNchildVerticalAlignment | XmCChildVerticalAlignment | unsigned char | XmALIGNMENT_CENTER | CSG | +----------------------------+-----------------------------+---------------+------------------------+--------+ |XmNframeChildType | XmCFrameChildType | unsigned char | XmFRAME_WORKAREA_CHILD | CSG | +----------------------------+-----------------------------+---------------+------------------------+--------+ +----------------------------+-----------------------------+---------------+------------------------+--------+ XmNchildType Refer to the XmNframeChildType resource description. The XmNchildType resource is obsoleted by XmNframeChildType, but is kept here for backward compatibility. XmNchildHorizontalAlignment Specifies the alignment of the title. This resource has the following values: o XmALIGNMENT_BEGINNING o XmALIGNMENT_CENTER o XmALIGNMENT_END See the description of XmNalignment in the XmLabel reference page for an explanation of these values. XmNchildHorizontalSpacing Specifies the minimum distance between either edge of the title text and the inner edge of the Frame shadow. Clipping of the title text occurs in order to maintain this spacing. The default value is the margin width of the Frame. XmNchildVerticalAlignment Specifies the vertical alignment of the title text, or the title area in relation to the top shadow of the Frame. XmALIGNMENT_BASELINE_BOTTOM Causes the baseline of the title to align vertically with the top shadow of the Frame. In the case of a multi-line title, the baseline of the last line of text aligns vertically with the top shadow of the Frame. XmALIGNMENT_BASELINE_TOP Causes the baseline of the first line of the title to align vertically with the top shadow of the Frame. XmALIGNMENT_CHILD_TOP Causes the top edge of the title area to align vertically with the top shadow of the Frame. XmALIGNMENT_CENTER Causes the center of the title area to align vertically with the top shadow of the Frame. XmALIGNMENT_CHILD_BOTTOM Causes the bottom edge of the title area to align vertically with the top shadow of the Frame. XmNframeChildType Specifies whether a child is a title or work area. Frame supports a single title and/or work area child. The possible values are o XmFRAME_TITLE_CHILD o XmFRAME_WORKAREA_CHILD o XmFRAME_GENERIC_CHILD The Frame geometry manager ignores any child of type XmFRAME_GENERIC_CHILD. This resource replaces XmNchildType. Inherited Resources Frame inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the reference page for that superclass. +----------------------------------------------------------------------------------------------------+ | | XmManager Resource Set | | | |Name | Class | Type | Default | Access | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNbottomShadowColor | XmCBottomShadowColor | Pixel | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNforeground | XmCForeground | Pixel | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNhighlightColor | XmCHighlightColor | Pixel | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNhighlightPixmap | XmCHighlightPixmap | Pixmap | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNinitialFocus | XmCInitialFocus | Widget | NULL | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNlayoutDirection | XmCLayoutDirection | XmDirection | dynamic | CG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNnavigationType | XmCNavigationType | XmNavigationType | XmTAB_GROUP | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNpopupHandlerCallback | XmCCallback | XtCallbackList | NULL | C | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNshadowThickness | XmCShadowThickness | Dimension | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNstringDirection | XmCStringDirection | XmStringDirection | dynamic | CG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNtopShadowColor | XmCTopShadowColor | Pixel | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNtopShadowPixmap | XmCTopShadowPixmap | Pixmap | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNtraversalOn | XmCTraversalOn | Boolean | True | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNunitType | XmCUnitType | unsigned char | dynamic | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ |XmNuserData | XmCUserData | XtPointer | NULL | CSG | +------------------------+-----------------------+-------------------+----------------------+--------+ +------------------------+-----------------------+-------------------+----------------------+--------+ +-----------------------------------------------------------------------+ | | Composite Resource Set | | | |Name | Class | Type | Default | Access | +------------------+-------------------+-------------+---------+--------+ |XmNchildren | XmCReadOnly | WidgetList | NULL | G | +------------------+-------------------+-------------+---------+--------+ |XmNinsertPosition | XmCInsertPosition | XtOrderProc | NULL | CSG | +------------------+-------------------+-------------+---------+--------+ |XmNnumChildren | XmCReadOnly | Cardinal | 0 | G | +------------------+-------------------+-------------+---------+--------+ +------------------+-------------------+-------------+---------+--------+ +---------------------------------------------------------------------------------------------------------------+ | | Core Resource Set | | | |Name | Class | Type | Default | Access | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNaccelerators | XmCAccelerators | XtAccelerators | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNbackground | XmCBackground | Pixel | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNborderColor | XmCBorderColor | Pixel | XtDefaultForeground | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNcolormap | XmCColormap | Colormap | dynamic | CG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNdepth | XmCDepth | int | dynamic | CG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNheight | XmCHeight | Dimension | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean | True | C | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNscreen | XmCScreen | Screen * | dynamic | CG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNsensitive | XmCSensitive | Boolean | True | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNtranslations | XmCTranslations | XtTranslations | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNwidth | XmCWidth | Dimension | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNx | XmCPosition | Position | 0 | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNy | XmCPosition | Position | 0 | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ +------------------------------+-------------------------------+----------------+----------------------+--------+ Translations XmFrame inherits translations from XmManager. RELATED
Composite(3), Constraint(3), Core(3), XmCreateFrame(3), XmManager(3), XmVaCreateFrame(3), and XmVaCreateManagedFrame(3). XmFrame(library call)
All times are GMT -4. The time now is 08:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy