Sponsored Content
Top Forums Shell Programming and Scripting parsing a STAR tag-value file Post 302082953 by mike@freddiemac on Thursday 3rd of August 2006 09:08:36 PM
Old 08-03-2006
Question parsing a STAR tag-value file

I have a recent file I am trying to parse that looks like this:

value_one:1:value_two:2:value_three:3

value_one matches to 1
value_two matches to 2
value_three matches to 3


the semi-colons not only seperate the tags to their corresponding values, but also seperate tag/value pairs from one another

is there anyway to parse this file so that I can get an output that looks like this:

1
2
3


and also another output that looks like this:

value_one
value_two
value_three



any help appreciated Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

2. What is on Your Mind?

Did you watch Super Star (Thalaivar's) Endhiran Movie?

Robot fever is there throughout the world ! :b: (3 Replies)
Discussion started by: matrixmadhan
3 Replies

3. Red Hat

What is star

I am looking to take the Redhat Certification exam, and one of the guidelines is: Can someone tell me what star is? Thank you. (2 Replies)
Discussion started by: druidmatrix
2 Replies

4. Shell Programming and Scripting

How to retrieve the value from XML tag whose end tag is in next line

Hi All, Find the following code: <Universal>D38x82j1JJ </Universal> I want to retrieve the value of <Universal> tag as below: Please help me. (3 Replies)
Discussion started by: mjavalkar
3 Replies

5. Shell Programming and Scripting

Search for a html tag and print the entire tag

I want to print from <fruits> to </fruits> tag which have <fruit> as mango. Also i want both <fruits> and </fruits> in output. Please help eg. <fruits> <fruit id="111">mango<fruit> . another 20 lines . </fruits> (3 Replies)
Discussion started by: Ashik409
3 Replies

6. Shell Programming and Scripting

XML Parse between to tag with upper tag

Hi Guys Here is my Input : <?xml version="1.0" encoding="UTF-8"?> <xn:MeContext id="01736"> <xn:VsDataContainer id="01736"> <xn:attributes> <xn:vsDataType>vsDataMeContext</xn:vsDataType> ... (12 Replies)
Discussion started by: pareshkp
12 Replies

7. Shell Programming and Scripting

To search for a particular tag in xml and collate all similar tag values and display them count

I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help File: <xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies

8. Solaris

Star/Libre/Open/???-Office for Solaris 11.2 ?

It's been a few years since this topic was last asked and answered.. curious whether anyone knows if the landscape has improved? looking for a more modern release of OpenOffice / LibreOffice / etc than the OOo-3.3 version mentioned in earlier posts from 2012. Would prefer not to compile from... (1 Reply)
Discussion started by: Yeaboem
1 Replies

9. Shell Programming and Scripting

Can't rcmd with star name

We have had a script here for years used to send files to other computers or to rcmd a command entered thru a prompt. A file we are looking for on the other computers will start with the same characters followed by -nnnnnn.txt. I can log into another computer and find (or not) that file, but not... (4 Replies)
Discussion started by: wbport
4 Replies

10. Shell Programming and Scripting

Moving XML tag/contents after specific XML tag within same file

Hi Forum. I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script. Any feedback will be greatly appreciated. ... (19 Replies)
Discussion started by: pchang
19 Replies
XmFontList(library call)												  XmFontList(library call)

NAME
XmFontList -- Data type for a font list SYNOPSIS
#include <Xm/Xm.h> DESCRIPTION
XmFontList is the data type for a font list. A font list consists of font list entries. Each entry contains a font or a font set (a group of fonts) and is identified with a tag, which is optional. If this tag is NULL, the tag is set to XmFONTLIST_DEFAULT_TAG. The value of XmFONTLIST_DEFAULT_TAG is XmFONTLIST_DEFAULT_TAG_STRING. When a compound string is displayed, the font list element tag of the compound string segment is matched with a font list entry tag in the font list and the matching font list entry is used to display the compound string. A font list entry is chosen as follows: o The first font list entry whose tag matches the tag of the compound string segment is used. o If no match has been found and if the tag of the compound string segment is XmFONTLIST_DEFAULT_TAG, the first font list entry whose tag matches the tag that would result from creating an entry with XmSTRING_DEFAULT_CHARSET is used. For example, if creating an entry with XmSTRING_DEFAULT_CHARSET would result in the tag ISO8859-1, the compound string segment tag XmFONTLIST_DEFAULT_TAG matches the font list entry tag ISO8859-1. o If no match has been found and if the tag of the compound string segment matches the tag that would result from creating a segment with XmSTRING_DEFAULT_CHARSET, the first font list entry whose tag is XmFONTLIST_DEFAULT_TAG is used. o If no match has been found, the first entry in the font list is used. The font list interface consists of the routines listed in Related Information. Font lists are specified in resource files with the following syntax: resource_spec: font_entry [, font_entry ]+ The resource value string consists of one or more font list entries separated by commas. Each font_entry identifies a font or font set and an optional font list entry tag. A tag specified for a single font follows the font name and is separated by = (equals sign); otherwise, in a font set the tag is separated by a colon. The colon is required whether a tag is specified or not. A font entry uses the following syntax to specify a single font: font_name [ '=' tag ] For example, the following entry specifies a 10 point Times Italic font without a font list entry tag; *fontList: -Adobe-Times-Medium-I-Normal--10* A font entry containing a font set is similar, except a semicolon separates multiple font names and the specification ends with a colon followed by an optional tag: font_name [ ';' font_name ]+ ':' [ tag ] A font_name is an X Logical Font Description (XLFD) string and tag is any set of characters from ISO646IRV except space, comma, colon, equal sign and semicolon. Following is an example of a font set entry. It consists of three fonts (except for charsets), and an explicit font list entry tag. *fontList: -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150;-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240;-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120:MY_TAG Note that the XmRenderTable is another data type that can be used for font lists. Refer to the XmRenderTable(3) for details. RELATED
XmFontListAdd(3), XmFontListAppendEntry(3), XmFontListCopy(3), XmFontListCreate(3), XmFontListEntryCreate(3), XmFontListEntryFree(3), XmFontListEntryGetFont(3), XmFontListEntryGetTag(3), XmFontListEntryLoad(3), XmFontListFree(3), XmFontListFreeFontContext(3), XmFontList- GetNextFont(3), XmFontListInitFontContext(3), XmFontListNextEntry(3), XmFontListRemoveEntry(3), XmRenderTable(3), and XmString(3). XmFontList(library call)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy