Hi All,
I am a newbie for Unix Script. I have report like the following: (file name: Report.txt):
Report No.: AAA
BE NO: 111
asfsdflsjdfklsdjfklsjfklsfsflsjdlk
fsdfjsfkjsklfsfj
Report No.: AAA
BE NO: 111
sdfsdfjsdklfjsfkj
fsdflkjsdfklsjkl
Report No.: AAA (16 Replies)
Hi friends,
I have data in flat file as following, first filed is the customer number. We have almost 50-100 customers in the system
100 ABC A123
100 BVC D234
100 BNC N324
200 CBC A122
200 AVC D294
200 HNC N324
300 GBC A173
300 FVC D234
300 DNC N344
I want to split the file and... (5 Replies)
Hello,
i have a very big file that has more then 80 MBytes (100MBytes). So with my CVS Application I cannot commit this file (too Big) because it must have < 80 MBytes.
How can I split this file into two others files, i think the AIX Unix command :
split -b can do that, buit how is the right... (2 Replies)
Hello, I am using awk to split a file into multiple files using command:
nawk '{
if ( $1 == "<process" )
{
n=split($2, arr, "\"");
file=arr
}
print > file }' processes.xml
<process name="Process1.process">
... (3 Replies)
I have a requirement to split a huge file to smaller text files based on first four characters which look like
ABCD
1234
DFGH
RREX
:
:
:
:
:
0000
Each of these records are OF EQUAL bytes with a different internal layout based on the above first digit identifier..
Any help to start... (5 Replies)
Hi HP-admins,
I have 120GB file on HP-UX and need to split to 4GB pieces and join them on Windows.
As I don't want to use zipsplit, tried to use split command and join on windows using "copy /b" but it doesn't work (It merges and creates new file but file is corrupt)
What is the correct... (6 Replies)
this thread is a continuation from previous thread
https://www.unix.com/shell-programming-and-scripting/223901-split-big-file-into-multiple-files-based-first-four-characters.html
..I am using awk to split file and I have a syntax error while executing the below code
I am using AIX 7.2... (4 Replies)
Hi All,
We need to split a large xml into multiple valid xml with same header(2lines) and footer(last line) for N number of letterId.
In the example below we have first 2 lines as header and last line as footer.(They need to be in each split xml file)
Header:
<?xml version="1.0"... (5 Replies)
HI
I want to split file base on tag name.
I have few header and footer on file
<?xml version="1.33" encing="UTF-8"?>
<bulkCmConfigDataFile"
<xn:SubNetwork id="ONRM_ROOT">
<xn:MeContext id="PPP04156">
... (4 Replies)
Discussion started by: pareshkp
4 Replies
LEARN ABOUT DEBIAN
xml::quote
Quote(3pm) User Contributed Perl Documentation Quote(3pm)NAME
XML::Quote - XML quote/dequote functions
SYNOPSIS
use strict;
use XML::Quote qw(:all);
my $str=q{666 > 444 & "apple" < 'earth'};
print xml_quote($str),"
";
# 666 > 444 & "apple" < 'earth'
my $str2=q{666 > 444 & "apple" < 'earth'};
print xml_dequote($str2),"
";
# 666 > 444 & "apple" < 'earth'
my $str3=q{666 > 444 & "apple" < 'earth'};
print xml_quote_min($str3),"
";
# 666 > 444 & "apple" < 'earth'
DESCRIPTION
This module provides functions to quote/dequote strings in "xml"-way.
All functions are written in XS and are very fast; they correctly process utf8, tied, overloaded variables and all the rest of perl
"magic".
FUNCTIONS
$quoted = xml_quote($str);
This function replaces all occurences of symbols '&', '"', ''', '>', '<' to '&', '"', ''', '>', '<' respectively.
Returns quoted string or undef if $str is undef.
$dequoted = xml_dequote($str);
This function replaces all occurences of '&', '"', ''', '>', '<' to '&', '"', ''', '>', '<' respectively. All
other entities (for example ) will not be touched.
Returns dequoted string or undef if $str is undef.
$quoted = xml_quote_min($str);
This function replaces all occurences of symbols '&', '"', '<' to '&', '"', '<' respectively. Symbols ''' and '>' are not
replaced.
Returns quoted string or undef if $str is undef.
EXPORT
xml_quote(), xml_dequote() are exported as default.
PERFORMANCE
You can use t/benchmark.pl to test the perfomance. Here is the result on my P4 box.
Benchmark: timing 1000000 iterations of perl quote, xs quote...
perl quote: 108 wallclock secs (88.08 usr + 0.01 sys = 88.09 CPU) @ 11351.64/s (n=1000000)
xs quote: 20 wallclock secs (16.78 usr + 0.00 sys = 16.78 CPU) @ 59591.20/s (n=1000000)
Benchmark: timing 1000000 iterations of perl dequote, xs dequote...
perl dequote: 106 wallclock secs (85.22 usr + 0.09 sys = 85.31 CPU) @ 11721.54/s (n=1000000)
xs dequote: 19 wallclock secs (15.92 usr + 0.02 sys = 15.94 CPU) @ 62743.13/s (n=1000000)
AUTHOR
Sergey Skvortsov <skv@protey.ru>
SEE ALSO
http://www.w3.org/TR/REC-xml <http://www.w3.org/TR/REC-xml>, perlre
COPYRIGHT
Copyright 2003 Sergey Skvortsov <skv@protey.ru>. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2008-06-26 Quote(3pm)