Sponsored Content
Top Forums Shell Programming and Scripting Remove lines with non-chinese characters from xml file Post 302500639 by g4rb4g3 on Tuesday 1st of March 2011 06:38:39 AM
Old 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

Chinese characters on Sol 2.7

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

Chinese characters in Vi editor

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

How to remove xml namespace from xml file using shell script?

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

Remove lines from XML based on condition

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

Chinese / Global characters problem

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

How to remove some xml tag lines using shell script

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

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

8. Shell Programming and Scripting

How can I remove some xml tag lines using shell script?

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

How to display Chinese and Japanese Characters on Rhel 6?

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

Display Chinese and Japanese characters on my SLES console.

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
PASTEBINIT(1)							  [FIXME: manual]						     PASTEBINIT(1)

NAME
pastebinit - command-line pastebin client SYNOPSIS
pastebinit [-abfhiljmrtup] DESCRIPTION
This manual page documents briefly the pastebinit commands pastebinit reads text and sends it to a "pastebin" on the internet, returning the URL to the user. It allows the text to be passed through a pipe (|) or from a file passed as an argument. OPTIONS
Optional arguments (not supported by all pastebins) -a [author] (default: $USER) -b [pastebin url] (default is distro-specific with a fallback to pastebin.com) -f [format for syntax-highlighting] (default: text) (check pastebin's website for complete list, example: python) -h Help screen -i [filename] Use filename for input -l List all the supported pastebins -j [jabberid] (default: none) -m [permatag] (default: none) -r [parent post ID] (default: none) -t [title of paste] (default: none) -u [username] (default: none) -p [password] (default: none) CONFIGURATION FILE
If a .pastebinit.xml file is found in the user's home directory, pastebinit will use it for its configuration. Here's an example file: <pastebinit> <pastebin>http://paste.ubuntu.com</pastebin> <author>Stephane Graber</author> <jabberid>stgraber@stgraber.org</jabberid> <format>text</format> </pastebinit> AUTHORS
Pastebinit is currently written by Stephane Graber. username, password, format, title, arguments and redirect support added by Daniel Bartlett. Website: http://launchpad.net/pastebinit E-mail: stgraber@ubuntu.com COPYRIGHT
Copyright (C) 2007-2011 Stephane Graber [FIXME: source] January 09, 2011 PASTEBINIT(1)
All times are GMT -4. The time now is 03:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy