Hi All,
I have this(.xml) file as:
<!-- define your instance here -->
<instance name='ins_C2Londondev' user='' group='' fullname='B2%20-%20London%20(dev)' >
<property>
</property>
</instance>
I want output as:
<!-- define your instance here -->
<instance... (3 Replies)
Hi All,
I have a log file like this
E Mon Oct 06 00:17:08 2008 xxx2 cm:10614 fm_pi2_svc_iptv_purchase.c:149 1:pin_deferred_act:10601:11:169:1223245028:16
pi2_op_svc_iptv_purchase error
<location=PIN_ERRLOC_FM:5 class=PIN_ERRCLASS_SYSTEM_DETERMINATE:1... (10 Replies)
GNU sed version 4.1.4 on Windows XP SP3 from GnuWin32
I think that I've come across a seemingly simple text file change problem on a INI formatted file that I can't do with SED without side effects edge cases biting me. I've tried to think of various ways of doing this elegantly and quickly... (5 Replies)
Yes, there is a great doc out there that discusses parsing csv files with sed, and this topic has been covered before but not enough to answer my question (unix.com forums).
I'm trying to parse a CSV file that has optional quotes like the following:
"Apple","Apples, are fun",3.60,4.4,"I... (3 Replies)
I don't necessary have a problem, as I have a solution. It is just that there may be a better solution.
GOAL: Part one: Parse data from a file using the "\" as a delimiter and extracting only the last delimiter. Part two: Parse same file and extract everything but the last delimited item.
... (8 Replies)
I have a large xml file as shown below:
<input>
<blah>
<blah>
<atr="blah blah value = "">
<blah>
<blah>
</input>
..2nd chunk...
..3rd chunk...
...4th chunk...
All lines between <input> and </input> is one 'order' and this 'order' is repeated... (14 Replies)
Hello fellows,
Sure you can help this poor guy that is struggling against sed command, being unable to tame it
I have a lot of files like this:
From this one, I need to obtain values highlighted in bold/red
To do so, I am executing this piece of code inside a loop:
... (10 Replies)
Hello.
I am trying to modify a config file which is in windows *.ini type file.
I have found a piece of code here :linux - Edit file in unix using SED - Stack Overflow
As I can't make it doing the job , I am trying to find a solution step by step.
here a modified sample file : my_sample.ini... (1 Reply)
I have a text file with records of the form:
A X1 Y1 X2 Y2 X3 Y3
where A is character length 10, Xi is character length 4 and Yi is numeric length 10.
I want to parse the line, and output records like:
A X1 Y1
A X2 Y2
A X3 Y3
etc
Can anyone please give me an idea of how to do this. ... (4 Replies)
Discussion started by: wvdeijk
4 Replies
LEARN ABOUT OSX
ini
inifile(n) Parsing of Windows INI files inifile(n)
__________________________________________________________________________________________________________________________________________________NAME
inifile - Parsing of Windows INI files
SYNOPSIS
package require Tcl 8.2
package require inifile ?0.2.3?
::ini::open file ?access?
::ini::close ini
::ini::commit ini
::ini::revert ini
::ini::filename ini
::ini::sections ini
::ini::keys ini section
::ini::get ini section
::ini::exists ini section ?key?
::ini::value ini section key ?default?
::ini::set ini section key value
::ini::delete ini section ?key?
::ini::comment ini section ?key? ?text?
::ini::commentchar ?char?
_________________________________________________________________DESCRIPTION
This package provides an interface for easy manipulation of Windows INI files.
::ini::open file ?access?
Opens an INI file and returns a handle that is used by other commands. access is the same as the first form (non POSIX) of the open
command, with the exception that mode a is not supported. The default mode is r+.
::ini::close ini
Close the specified handle. If any changes were made and not written by commit they are lost.
::ini::commit ini
Writes the file and all changes to disk. The sections are written in arbitrary order. The keys in a section are written in alphabet-
ical order. If the ini was opened in read only mode an error will be thrown.
::ini::revert ini
Rolls all changes made to the inifile object back to the last committed state.
::ini::filename ini
Returns the name of the file the ini object is associated with.
::ini::sections ini
Returns a list of all the names of the existing sections in the file handle specified.
::ini::keys ini section
Returns a list of all they key names in the section and file specified.
::ini::get ini section
Returns a list of key value pairs that exist in the section and file specified.
::ini::exists ini section ?key?
Returns a boolean value indicating the existance of the specified section as a whole or the specified key within that section.
::ini::value ini section key ?default?
Returns the value of the named key and section. If specified, the default value will be returned if the key does not exist. If the
key does not exist and no default is specified an error will be thrown.
::ini::set ini section key value
Sets the value of the key in the specified section. If the section does not exist then a new one is created.
::ini::delete ini section ?key?
Removes the key or the entire section and all its keys. A section is not automatically deleted when it has no remaining keys.
::ini::comment ini section ?key? ?text?
Reads and modifies comments for sections and keys. To write a section comment use an empty string for the key. To remove all com-
ments use an empty string for text. text may consist of a list of lines or one single line. Any embedded newlines in text are prop-
erly handled. Comments may be written to nonexistant sections or keys and will not return an error. Reading a comment from a nonex-
istant section or key will return an empty string.
::ini::commentchar ?char?
Reads and sets the comment character. Lines that begin with this character are treated as comments. When comments are written out
each line is preceded by this character. The default is ;.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category inifile
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
CATEGORY
Text processing
inifile 0.2.3 inifile(n)