06-04-2008
I don't think you got wat i really want,
to be more precise
i have an xml file specified in that file i need to put the value provided in tha last field to the tag provided and 1 says that i need to put the value in the first occurance and 2 says that i need to put the value in the second occurrance
property file is just the input file... i need to replcae the changes in the xml file
Thanks in Advance
subin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a file which contains the following two lines which are same But I would like to insert the value=8.8.8.8 in the 1st occurance line and value=9.9.9.9 in the 2nd occurance line.
<parameter name="TestIp1" value="">
<parameter name="TestIp1" value="">
Please suggest (1 Reply)
Discussion started by: madhusmita
1 Replies
2. UNIX for Dummies Questions & Answers
There is scenario that i have to replace a pattern at the first 5 occurance in a file. say i need to replace 'abc' by 'xyz' at its first 5 occurance in a file a.txt,
can anybody help me how it can be done, i can do complete replacement of the pattern using sed throughtout the file. (1 Reply)
Discussion started by: palash2k
1 Replies
3. Shell Programming and Scripting
HI please let me know if there is any command to search and replace only the last occurence of a string in aline.
Eg:
" This cat is a cat with a tail longer of all cat."
I need to replace only the last "cat" in the above line.
thanks (3 Replies)
Discussion started by: harikris614
3 Replies
4. Shell Programming and Scripting
#original file
.
.
~
~
Index=2
xxx
replace #dont replace 1st occurance
yyy
Index=2
xxx
replace #substitue replace with "REPLACE"
yyy
Index=2
xxx
replace #substitue replace with "REPLACE"
yyy
Index=3
xxx
replace (3 Replies)
Discussion started by: cjjoy
3 Replies
5. Shell Programming and Scripting
Hi,
I need to search a string and replace with nothing, but only the First occurring string
using sed/perl/awk (3 Replies)
Discussion started by: suraj.sheikh
3 Replies
6. Shell Programming and Scripting
how to delete/replace the the odd occurance of a pattern say newline character "\n"
a,b,c,d
e,f
g, h, i, j, k, l
m,n
1, 2, 3, 4,
5, 6
1, 3, 4, 5, 6, 7
the output should be
a,b,c,de,f
g, h, i, j, k, lm,n
1, 2, 3, 4,5, 6
1, 3, 4, 5, 6, 7 (4 Replies)
Discussion started by: ratheeshjulk
4 Replies
7. Shell Programming and Scripting
I want to replace every 2nd occurance of a string/character from a line.
ababacbsbddbsbbcbdbssb
i want to replace every s2nd b with @ like below
should be like
aba@acbs@ddbs@bc@dbss@ (3 Replies)
Discussion started by: ratheeshjulk
3 Replies
8. Linux
Please help me, wasted hrs:wall:, to find this soulution:-
I need a command that will work on file (xml) and replace multiple occurrence (more than 2 times)
Examples
1. '==='
2. '===='
3. '======='
should be replaced by just '=='
Note :- single character should be replaced. (=... (13 Replies)
Discussion started by: RedRocks!!
13 Replies
9. Shell Programming and Scripting
I have file with SQL output as
0001 firstname1 lastname1 0002 firstname2 lastname2 0003 firstname3 lastname3 0004 firstname4 lastname4
Expected output :
0001 firstname1 lastname1
0002 firstname2 lastname2
0003 firstname3 lastname3
0004 firstname4 lastname4
Let me know if this can... (9 Replies)
Discussion started by: sameermohite
9 Replies
10. Shell Programming and Scripting
Hi I want to replace only the last occurance of "union all" in input file with ";"
I tried with sed 's/union all/;/g' in my input file, it replaced in all lines of input file
Eg:
select column1,column2 from test1 group by 2 union all
select column1,column2 from test2 group by 2 union all
... (9 Replies)
Discussion started by: antosr7
9 Replies
LEARN ABOUT OPENDARWIN
service_bundle
service_bundle(4) File Formats service_bundle(4)
NAME
service_bundle - service manifest file format
SYNOPSIS
/usr/share/lib/xml/dtd/service_bundle.dtd.1
DESCRIPTION
The service management facility, described in smf(5), utilizes an XML-based file format to marshal the description of a set of services or
service instances between systems. This file is known as a service bundle. The primary form of a service bundle is the inventory of ser-
vices that are provided by a package, which is called a "service manifest".
The DTD describing the service_bundle is provided at /usr/share/lib/xml/dtd/service_bundle.dtd.1. service_bundle documents can also use the
XML Inclusions (XInclude) facility to merge multiple documents into one. A service_bundle document manipulator must therefore support the
functionality defined by the XInclude specification.
A complete service description consists of the following:
o A set of properties that identify the service and identify its restarter
o A set of properties that identify each instance
o A set of framework property groups that describe the framework's understanding of each instance
o A set of method property groups as required by svc.startd(1M), or by a delegated restarter
o Additional optional method property groups
o A set of dependency property groups
o An optional group of properties that indicate services to which dependencies on the described service were added
o A set of application property groups or application-specific typed property groups containing application configuration data
o A template that describes supporting information about this service, such as a description and links to documentation.
The document type definition for the service bundle provides markup to define each of these aspects of a service description, as well as a
number of entities that identify regular features in describing a service, such as the <create_default_instance> tag.
The attributes and tags are fully described in the commented DTD. The services supplied with the operating system, stored under
/var/svc/manifest, provide examples of correctly formed service descriptions.
Localization in the Template Element
The description tags in the template element for a service are internationalizable. Service developers wishing to provided localized
descriptions of their services can elect to deliver a set of loctext element in the description, like
<common_name>
<loctext xml:lang="C">extended accounting<loctext>
<loctext xml:lang="fr_CA">...</loctext>
<loctext xml:lang="ja">...</loctext>
....
</common_name>
Alternatively, service developers can choose to deliver multiple manifests in the naming scheme
/var/svc/manifest/[category]/[service].[locale].xml
which define only the localized template elements for that service. For instance
/var/svc/manifest/system/accounting.ja.xml
would contain, inside the template element, the following for the service's common name
<common_name>
<loctext xml:lang="ja">...</loctext>
</common_name>
Importing this file would create the service if not defined, or augment the existing template with the additional localized entries.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
svcadm(1M), svccfg(1M), svc.startd(1M), libscf(3LIB), attributes(5), locale(5), smf(5)
NOTES
Nested service_bundle elements must be of the same type.
SunOS 5.10 30 Aug 2004 service_bundle(4)