awk 'BEGIN{f=1}
/<machine xsi:type="unix-machineType">/{f--}
!f && /<\/machine>/{f--;next}
f' file
Regards
Works perfect. There any way that can be done w/o piping it to another file, and just perform the command on the existing file? The script I'm going to add this to already backs it up so no need to name it to a tmp tile and then rename it again.
Hi ,
I need some help on perl/sed conditional replacement
The situation is like below .
I have a file contents like below .
AAA|BBB|CCC|DDD
AAA|BCF|CCC|HHH
AAA|BVF|JJJ|KKK
Here in the above file . I know my second column value (taking "|" as my delimited )
Basically I have to... (3 Replies)
We have 2 XML file 1. ORIGINAL.xml file and 2. ATTRIBUTE.xml files, In the ORIGINAL.xml we need some modification as <resourceCode>431048</resourceCode>under <item type="Manufactured"> tag - we need to grab the 431048 value from tag and pass it to database table in unix shell script to find the... (0 Replies)
Hi All,
I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me.
<A>testing_Location</A>
<value>LA</value>
<zone>US</zone>
<B>Region</B>
<value>Russia</value>
<zone>Washington</zone>
<C>Country</C>... (0 Replies)
Hi Anybody can help me to make a script that replace string "Su saldo es" with "Your balance" in XML block if it start with Text Id=98 and Text Id= 12 only sample of part of file below
<Text Id="98">
<Language id="1">Su saldo es $mainAccountBalance1Tiene ademas $dedicatedAccount1Balance1... (13 Replies)
Hi,
I have a file where I want to replace the 15th field separated by comma, only on specific lines matching lots of different conditions.
I have managed to read the file line by line, within the loop my line is held in a variable called $line
I assume this will be using sed (maybe... (5 Replies)
Hi All,
I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom.
from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
Hi All,
We need to split a large xml into multiple valid xml with same header(2lines) and footer(last line) for N number of letterId.
In the example below we have first 2 lines as header and last line as footer.(They need to be in each split xml file)
Header:
<?xml version="1.0"... (5 Replies)
Hi all,
Saying we have two files:
1. A "Reference File" whose content is "Variable Name": "Variable Value"
2. A "Model File" whose content is a model program in which I want to substitute "VariableName" with their respective value to produce a third file "Program File" which would be a... (4 Replies)
I want to write a one line script that outputs the result of multiple xml tags from a XML file. For example I have a XML file which has below XML tags in the file:
<EMAIL>***</EMAIL>
<CUSTOMER_ID>****</CUSTOMER_ID>
<BRANDID>***</BRANDID>
Now I want to grep the values of all these specified... (1 Reply)
I'm searching for the names of a TV show in the XML file I've attached at the end of this post. What I'm trying to do now is pull out/list the data from each of the <SeriesName> tags throughout the document. Currently, I'm only able to get data the first instance of that XML field using the... (9 Replies)
Discussion started by: hungryd
9 Replies
LEARN ABOUT X11R4
tile
tile(n) BLT Built-In Commands tile(n)__________________________________________________________________________________________________________________________________________________NAME
tile - Tiling versions of Tk widgets
SYNOPSIS
tile::button pathName option value...
tile::checkbutton pathName option value...
tile::frame pathName option value...
tile::label pathName option value...
tile::radiobutton pathName option value...
tile::scrollbar pathName option value...
tile::toplevel pathName option value...
_________________________________________________________________DESCRIPTION
The tile widgets let you create textured backgrounds. The texture is a Tk image which is tiled over the entire background of the widget.
INTRODUCTION
With the advent of Tk 4.0, images are now easy to create and use in applications. Images add interest to applications and they convey more
information. But one area where Tk hasn't taken advantage of images is using images as textures for widgets. Since tiling is a standard
feature of windowing systems, it's very easy to use images as textures.
The tile widgets take the standard Tk 4.0 widgets and add tiling configuration options to them. Textures are specified by the name of the
image you wish to be tiled across the background of the widget.
EXAMPLE
To add tiling to a widget, you simply create an image using Tk's image command and use the image name as the value for the -tile configura-
tion option of the widget.
image create photo my_texture -file tan_paper.gif
blt::tile::frame .f -tile my_texture
The image my_texture is added to the frame. If my_texture is updated, so will the widget background.
image create photo my_texture -file rain.gif
The tile widget commands reside in the "blt::tile" namespace, so as not to collide with the normal Tk widgets. An easy way to add tiling
to existing programs is to import the tile widget commands into the global namespace.
image create photo my_texture -file tan_paper.gif
namespace import -force blt::tile::*
frame .f -tile my_texture
To use one image for all texturing, you can use the "Tile" option class name to specify the same image for all tile widgets.
image create photo my_texture -file tan_paper.gif
option add *Tile my_texture
OPTIONS
The following configurations options are added to the widgets. If a -tile or -activetile option is specified, it overrides the background
color of the widget.
-activetile image
Specifies a textured background to display when the widget is active. This option is available for the tilebutton, tilecheckbutton,
tileradiobutton, and tilescrollbar widgets. Image is the name an image created using Tk's image command. The background of the
widget is tiled with image. If image is "", then the active background color is displayed. The default is "".
-tile image
Specifies a textured background to display for the widget. Image is the name an image created using Tk's image command. The back-
ground of the widget is tiled with image. If image is "", then the normal background color is displayed. The default is "".
KEYWORDS
tile, texture, button, label, radiobutton, checkbutton, scrollbar, frame, toplevel
BLT 2.4 tile(n)