03-01-2011
Remove lines with non-chinese characters from xml file
Hi there, I'm looking for a way to remove all lines that don't contain chinese characters from an xml file.
Example:
http://pastebin.com/8KzSbCKe
The result should be like this:
http://pastebin.com/ZywXsNhx
Only lines that don't contain chinese characters should be deleted. If theres a mix of chinese and latin characters the line shouldn't get deleted.
I thought about using sed but I have no idea how...
Thanks!
Last edited by fpmurphy; 03-01-2011 at 10:48 PM..
Reason: httx ->http
10 More Discussions You Might Find Interesting
1. Solaris
Hi there,
I need to get a Chinese disclaimer attached to an email on a Solaris 2.7 box. The disclaimer we use is in English and stored as a text file although I've been asked to see if we can add the Chinsese one?
Is it simply just a matter of adding the Chinese locale to the OS or is there... (1 Reply)
Discussion started by: Hayez
1 Replies
2. Filesystems, Disks and Memory
Dear All,
I have excel files containing Chinese characters. I have a requirement to display the contents of both the English and the Chinese files in the Unix box using the vi editor. But I when I try to open the Chinese files, the characters are junk. Can one of you help me in getting rid of... (4 Replies)
Discussion started by: chrisanto_2000
4 Replies
3. Shell Programming and Scripting
I have an xml file:
<AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Table1>
<Data1 10 </Data1>
<Data2 20 </Data2>
<Data3 40 </Data3>
<Table1>
</AutoData>
and I have to remove the portion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" only.
I tried using sed... (10 Replies)
Discussion started by: Gary1978
10 Replies
4. Shell Programming and Scripting
Hi,
I need to remove some lines from an XML file is the value within a tag is empty.
Imagine this scenario,
<acd><acdID>2</acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
I... (3 Replies)
Discussion started by: giles.cardew
3 Replies
5. Solaris
Hello,
I have large xml files with chinese characters on a windows box and they need to be FTP'd to UNIX box. When I ftp the file, the chinese text converts to junk characters.
I tried changing my setting on putty to UTF-8, but still cannot view the correct text. Is there something I need to... (4 Replies)
Discussion started by: tokool420
4 Replies
6. Shell Programming and Scripting
I have existing XML file as below, now based on input string in shell script on workordercode i need to create a seprate xml file
for e.g if we pass the input string as 184851 then it find the tag data from <workOrder>..</workOrder> and write to a new file and similarly next time if i pass the... (3 Replies)
Discussion started by: balrajg
3 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
Hi All,
My name is Prathyu and I am working as a ETL develper. I have one requirement to create a XML file based on the provided XSD file. As per the Datastage standards Key(repeatable) field does not contain any Null values so I am inserting some dummy tag line to that XML file.
... (14 Replies)
Discussion started by: Prathyu
14 Replies
9. Red Hat
Hello,
I'm trying to figure out how to display Chinese and Japanese Characters on my RHEL 6 Console. There is no more "bogl-bterm" for RHEL6, that is not supported anymore. Is there any way that I could display them?
Thank you. (2 Replies)
Discussion started by: pjeedu2247
2 Replies
10. SuSE
Hello,
I'm trying to figure out how to display Chinese and Japanese Characters on my SLES 11 Console. Is there any way that I could display those characters on my console?
Thank you. (3 Replies)
Discussion started by: pjeedu2247
3 Replies
LEARN ABOUT SUSE
ivmconfigconditions.xml
IVMCONFIGCONDITIONS.XML(5) File Formats Manual IVMCONFIGCONDITIONS.XML(5)
NAME
IvmConfigConditions.xml - rules for processing hardware conditions by ivman(8)
DESCRIPTION
IvmConfigConditions.xml specifies hardware conditions to be caught by ivman(8), and allows running of certain commands when devices emit
conditions.
IvmConfigConditions.xml is parsed as an XML file. The general form of the file is:
<?xml version="1.0" encoding="UTF-8"?>
<ivm:ConditionsConfig version="0.1" xmlns:ivm="http://www.eikke.com/ivm">
<ivm:Match name="matchname" value="matchvalue">
<ivm:Condition name="conditionname1" exec="command1" />
<ivm:Condition name="conditionname1" exec="command1" />
</ivm:Match>
...
</ivm:PropertiesConfig>
Each time a condition is emitted by a device, this file will be parsed. If the Match rule matches the device on which the condition came
from, and the Condition rule matches the name of the condition which occurred, then the command specified in the 'exec' option will be exe-
cuted.
A Match element can have any of the following names:
ivm.mountable
Whether or not HAL specifies that a device can and should be mounted. Must be "true" or "false".
hal.anything
The string in place of "anything" will be taken as the name of a HAL property string for the device, and the value of the prop-
erty will be compared to the value given. Run 'lshal' to see a list of HAL properties which can be used here.
* Match every device. Use with care!
As many Matches can be nested as is desired.
Condition names usually take the form of something like 'ButtonPressed', which may occur when an ACPI-enabled button is pressed on your
machine. See the HAL specification for a full list of possible conditions.
The exec attributes of Condition tags support substitution of HAL device properties. This is accomplished by surrounding the property name
with $ symbols. For instance, if $hal.volume.mount_point$ is within a command, it will be replaced with the volume's mount point before
execution. No character escaping is done in the substitution, but the characters ' and " are replaced with ?, so you can surround the sub-
stitution with quotes without fear.
Remember that this is an XML file, which means that characters which have a special meaning in XML (entities) need to be escaped. Some
characters which are popular in shell scripting (&, <, >) are among these special characters. As a quick reference, & becomes & , <
becomes < , > becomes > , ' becomes ' and " becomes " .
SEE ALSO
ivman(8), IvmConfigBase.xml(5), IvmConfigActions.xml(5)
12 May 2005 IVMCONFIGCONDITIONS.XML(5)