Sponsored Content
Top Forums Shell Programming and Scripting Commenting a block of code in xml where the tags may be similar Post 302849763 by Lakshmikumari on Tuesday 3rd of September 2013 08:33:15 AM
Old 09-03-2013
Commenting a block of code in xml where the tags may be similar

I want to comment a block of code in xml. Note that the tags will be similar. In the below xml code, I want to block the listener block for com.pkg1.class2. How do i do it ?

Thanks in Advance

Code:
<listener>
<listener-class>com.pkg1.class1</listener-class>
</listener>
.........
<listener>
<listener-class>com.pkg1.class2</listener-class>
</listener>
............

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to execute the rest of the code after commenting multiple lines?

Hi, As I have seen in this forum how to comment multiple lines in the script, but it does not work properly for me. It is blocking the code but it does not execute the rest of the codes. This is my code #! /usr/bin/ksh month='date +"m%"' : << Comments Block if || then echo "inc =... (12 Replies)
Discussion started by: Yamini Thoppen
12 Replies

2. Shell Programming and Scripting

Commenting xml file lines

Hi , I have a XML file like this <dependency> <groupId>fr.xxxx.portail.ear</groupId> <artifactId>_xxxEAR</artifactId> <version>1.0.0-20xxxxx.xxxxx-x</version> <type>ear</type> </dependency> I need to comment single/multiple lines from XML file. How can i... (6 Replies)
Discussion started by: scorpio
6 Replies

3. UNIX and Linux Applications

Commenting out block of code in emacs in python mode

Hi, I am not sure if this is the right forum to post an emacs question, but if you could point me to an appropriate emacs forum that would be useful too. Anyway, here is the description of the problem: I usually develop python code with emacs, emacs being in python code. On my desktop a... (0 Replies)
Discussion started by: alex57326
0 Replies

4. Shell Programming and Scripting

Replacing part of XML code inside comment tags

Hello! I'd like to modify custom values in a XML config file between comment tags using bash script. <feature> <keyboardshortcut>C-m</keyboardshortcut> <option1>disabled</option2> <option2>enabled</option2> </feature> <!-- bash script features START --> <feature> ... (2 Replies)
Discussion started by: prism1
2 Replies

5. UNIX for Dummies Questions & Answers

Code commenting Problems in shell scripting

Hi Friends, I Want to comment one line of code from below code. DBA_ORACLE_USER=`DB.sh -u -a User` DBA_ORACLE_PWORD=`DB.sh -p -a User` sqlplus /nolog <<-END > ${logfile} 2>&1 WHENEVER OSERROR EXIT 9 WHENEVER SQLERROR EXIT SQL.SQLCODE connect... (3 Replies)
Discussion started by: as234301
3 Replies

6. Shell Programming and Scripting

How to add the multiple lines of xml tags before a particular xml tag in a file

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)
Discussion started by: mjavalkar
0 Replies

7. Shell Programming and Scripting

Shell Command to compare two xml lines while ignoring xml tags

I've got two different files and want to compare them. File 1 : HTML Code: <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Discussion started by: Shaishav Shah
1 Replies

8. Shell Programming and Scripting

How to add Xml tags to an existing xml using shell or awk?

Hi , I have a below xml: <ns:Body> <ns:result> <Date Month="June" Day="Monday:/> </ns:result> </ns:Body> i have a lookup abc.txtt text file with below details Month June July August Day Monday Tuesday Wednesday I need a output xml with below tags <ns:Body> <ns:result>... (2 Replies)
Discussion started by: Nevergivup
2 Replies

9. UNIX for Beginners Questions & Answers

How to pull multiple XML tags from the same XML file in Shell.?

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
pkgtrans(1)							   User Commands						       pkgtrans(1)

NAME
pkgtrans - translate package format SYNOPSIS
pkgtrans [-inosg] [-k keystore] [-a alias] [-P passwd] device1 device2 [pkginst...] DESCRIPTION
The pkgtrans utility translates an installable package from one format to another. It translates: o a file system format to a datastream o a file system format to a signed datastream o a datastream to a file system format o one file system format to another file system format OPTIONS
The options and arguments for this command are: -i Copies only the pkginfo(4) and pkgmap(4) files. -n Creates a new instance of the package on the destination device if any instance of this package already exists, up to the number speci- fied by the MAXINST variable in the pkginfo(4) file. -o Overwrites the same instance on the destination device. Package instance will be overwritten if it already exists. -s Indicates that the package should be written to device2 as a datastream rather than as a file system. The default behavior is to write a file system format on devices that support both formats. -g Sign resulting datastream. -k keystore Use keystore to retrieve private key used to generate signature. If it not specified, default locations are searched to find the speci- fied private key specified by -a. If no alias is given, and multiple keys exist in the key store, pkgtrans will abort. See KEYSTORE LOCATIONS and KEYSTORE AND CERTIFICATE FORMATS in pkgadd(1M) for more information on search locations and formats. When running as a user other than root, the default base directory for certificate searching is ~/.pkg/security, where ~ is the home directory of the user invoking pkgtrans. -a alias Use public key certificate associated with friendlyName alias, and the corresponding private key. See KEYSTORE LOCATIONS and KEYSTORE AND CERTIFICATE FORMATS in pkgadd(1M) for more information. -P passwd Supply password used to decrypt the keystore. See PASS PHRASE ARGUMENTS in pkgadd(1M) for details on the syntax of the argument to this option. OPERANDS
device1 Indicates the source device. The package or packages on this device will be translated and placed on device2. See DEVICE SPECIFIERS, below. device2 Indicates the destination device. Translated packages will be placed on this device. See DEVICE SPECIFIERS, below. pkginst Specifies which package instance or instances on device1 should be translated. The token all may be used to indicate all packages. pkginst.* can be used to indicate all instances of a package. If no packages are defined, a prompt shows all packages on the device and asks which to translate. The asterisk character (*) is a special character to some shells and may need to be escaped. In the C-Shell, "*" must be surrounded by single quotes (') or preceded by a backslash (). DEVICE SPECIFIERS
Packaging tools, including pkgtrans, pkgadd(1M), and pkgchk(1M), have options for specifying a package location by specifying the device on which it resides. Listed below are the device types that a package can be stored to and retrieved from. Note that source and destination devices cannot be the same. directory Packages can be stored onto a directory by specifying an absolute path to a file system directory. The package contents reside in a directory within the specified directory. The package directory name must be identical to its PKG specification in the pkginfo(4) file. An example device specification of this type is /export/packages. device Packages can be stored to a character or block device by specifying the device identifier as the device. Common examples of this device type are /dev/rmt/0 for a removable magnetic tape and /floppy/floppy0 for the first floppy disk on the system. pkgtrans can also pro- duce regular file system files in a stream format, which is suitable for storage on a character device, web server, or as input to pkgadd(1M). device alias Devices that have been specified in /etc/device.tab are eligible for being the recipient or source of a package. Common examples of this type of device specification are spool (the default package device location) and disk1. These names correspond to devices speci- fied in /etc/device.tab EXAMPLES
Example 1: Examples of the pkgtrans command The following example translates all packages on the floppy drive /dev/diskette and places the translations on /tmp: example% pkgtrans /dev/diskette /tmp all The following example translates packages pkg1 and pkg2 on /tmp and places their translations (that is, a datastream) on the 9track1 output device: example% pkgtrans /tmp 9track1 pkg1 pkg2 The following example translates pkg1 and pkg2 on /tmp and places them on the diskette in a datastream format: example% pkgtrans -s /tmp /dev/diskette pkg1 pkg2 The following example creates a signed package from pkg1 and pkg2, and reads the password from the $PASS environment variable: example% pkgtrans -sg -k /tmp/keystore.p12 -alias foo -p env:PASS /tmp /tmp/signedpkg pkg1 pkg2 ENVIRONMENT VARIABLES
The MAXINST variable is set in the pkginfo(4) file and declares the maximum number of package instances. EXIT STATUS
0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpkgcmdsu | +-----------------------------+-----------------------------+ |Interface Stability |: | | | | | Command line |Evolving | | | | | Digitally signed stream |Evolving | |package | | +-----------------------------+-----------------------------+ SEE ALSO
pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), installf(1M), pkgadd(1M), pkgask(1M), pkgrm(1M), removef(1M), pkginfo(4), pkgmap(4), attributes(5) Application Packaging Developer's Guide NOTES
By default, pkgtrans will not translate any instance of a package if any instance of that package already exists on the destination device. Using the -n option creates a new instance if an instance of this package already exists. Using the -o option overwrites an instance of this package if it already exists. Neither of these options are useful if the destination device is a datastream. SunOS 5.10 15 May 2003 pkgtrans(1)
All times are GMT -4. The time now is 04:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy