Hi! I'm just new here and don't know much about shell scripting. I just want to ask for help in creating a shell script that will parse a string or value of the status in the xml file. Please sample xml file below. Can you please help me create a simple script to get the value of status? Also it... (46 Replies)
Hello Scripting Gurus,
I need help with extracting data from the XML file using shell script.
The data is in a large XML and I need to extract the id values of all completedworkflows. Here is a sample of it. Input and output data is also in the attached text files.
<wfregistry>... (5 Replies)
I am faced with a :confused: tricky problem to parse a data file ( May not be a tricky problem to the scripting guru's ).
Here is what I am faced with. I have a file with multiple rows of data and the rows are not of fixed length. "|" is used as a delimiters for individual columns and each row... (3 Replies)
Hi
I am using shell script and i need to parse the data between parenthesis.How do i do it using shell script.
Ex: section(name).
I want to extract name from the above string using shell script. (4 Replies)
Hi All,
I have been working on something that doesn't seem to have a clear regex solution and I just wanted to run it by everyone to see if I could get some insight into the method of solving this problem.
I have a flat text file that contains billing records for users, however the records... (5 Replies)
Hi Everybody,
I have an XML file containing some data and i want to extract it, but the specific issue in my file is that the data is repeated some times like the following example :
<section1>
<subsection1>
X=...
Y=...
Z=...
<\subsection1>
<subsection2>
X=...
Y=...
Z=...... (2 Replies)
Hi,
I have to make an script according to these:
- I have couples of files like:
xxxxxxxxxxxxx.csv
xxxxxxxxxxxxx_desc.xml
- every xml file has diferent fields, but keeps this format:
........
<defaultName>2011-02-25T16:43:43.582Z</defaultName>
........... (2 Replies)
Hi All,
I need to parse some statistic data from the "measInfo" -eg. 25250000 (as highlighted) and return the result into line by line, and erasing all other unnecessary info/tag.
Thought of starting with grep "measInfoID="25250000" but this only returns 1 line. How do I get all the output... (8 Replies)
Hi
I have xml file with multiple records and would like to extract records from xml with specific condition if specific tag is present extract entire row otherwise skip .
<logentry revision="21510">
<author>mantest</author>
<date>2015-02-27</date>
<QC_ID>334566</QC_ID>... (12 Replies)
hi all, here is the sample log file and these errors are repeated in log file..
i need all the repeated time stamp ,severity and message tags needs to print in output file.. through shell script
<log-message>
<timestamp>2019-03-13T04:52:49.648-05:00</timestamp>
<severity>ERROR</severity>... (17 Replies)
Discussion started by: ravi
17 Replies
LEARN ABOUT OSX
apache2::uri
apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::ApacUser:Contributed Perl Dapache_mod_perl-108~358::mod_perl-2.0.7::docs::api::Apache2::URI(3)NAME
Apache2::URI - Perl API for manipulating URIs
Synopsis
use Apache2::URI ();
$hostport = $r->construct_server();
$hostport = $r->construct_server($hostname);
$hostport = $r->construct_server($hostname, $port);
$hostport = $r->construct_server($hostname, $port, $pool);
$url = $r->construct_url();
$url = $r->construct_url($rel_uri);
$url = $r->construct_url($rel_uri, $pool);
$parsed_uri = $r->parse_uri($uri);
$parsed_uri = $r->parsed_uri();
$url = join '%20', qw(one two three);
Apache2::URI::unescape_url($url);
Description
While "APR::URI" provides a generic API to dissect, adjust and put together any given URI string, "Apache2::URI" provides an API specific
to Apache, by taking the information directly from the $r object. Therefore when manipulating the URI of the current HTTP request usually
methods from both classes are used.
API
"Apache2::URI" provides the following functions and methods:
"construct_server"
Construct a string made of hostname and port
$hostport = $r->construct_server();
$hostport = $r->construct_server($hostname);
$hostport = $r->construct_server($hostname, $port);
$hostport = $r->construct_server($hostname, $port, $pool);
obj: $r ( "Apache2::RequestRec object" )
The current request object
opt arg1: $hostname ( string )
The hostname of the server.
If that argument is not passed, "$r->get_server_name" is used.
opt arg2: $port ( string )
The port the server is running on.
If that argument is not passed, "$r->get_server_port" is used.
opt arg3: $pool ( "APR::Pool object" )
The pool to allocate the string from.
If that argument is not passed, "$r->pool" is used.
ret: $hostport ( string )
The server's hostport string
since: 2.0.00
Examples:
o Assuming that:
$r->get_server_name == "localhost";
$r->get_server_port == 8001;
The code:
$hostport = $r->construct_server();
returns a string:
localhost:8001
o The following code sets the values explicitly:
$hostport = $r->construct_server("my.example.com", 8888);
and it returns a string:
my.example.com:8888
"construct_url"
Build a fully qualified URL from the uri and information in the request rec:
$url = $r->construct_url();
$url = $r->construct_url($rel_uri);
$url = $r->construct_url($rel_uri, $pool);
obj: $r ( "Apache2::RequestRec object" )
The current request object
opt arg1: $rel_uri ( string )
The path to the requested file (it may include a concatenation of path, query and fragment components).
If that argument is not passed, "$r->uri" is used.
opt arg2: $pool ( "APR::Pool object" )
The pool to allocate the URL from
If that argument is not passed, "$r->pool" is used.
ret: $url ( string )
A fully qualified URL
since: 2.0.00
Examples:
o Assuming that the request was
http://localhost.localdomain:8529/test?args
The code:
my $url = $r->construct_url;
returns the string:
http://localhost.localdomain:8529/test
notice that the query (args) component is not in the string. You need to append it manually if it's needed.
o Assuming that the request was
http://localhost.localdomain:8529/test?args
The code:
my $rel_uri = "/foo/bar?tar";
my $url = $r->construct_url($rel_uri);
returns the string:
http://localhost.localdomain:8529/foo/bar?tar
"parse_uri"
Break apart URI (affecting the current request's uri components)
$r->parse_uri($uri);
obj: $r ( "Apache2::RequestRec object" )
The current request object
arg1: $uri ( string )
The uri to break apart
ret: no return value
warning:
This method has several side-effects explained below
since: 2.0.00
This method call has the following side-effects:
1. sets "$r->args" to the rest after '?' if such exists in the passed $uri, otherwise sets it to "undef".
2. sets "$r->uri" to the passed $uri without the "$r->args" part.
3. sets "$r->hostname" (if not set already) using the ("scheme://host:port") parts of the passed $uri.
"parsed_uri"
Get the current request's parsed uri object
my $uri = $r->parsed_uri();
obj: $r ( "Apache2::RequestRec object" )
The current request object
ret: $uri ( "APR::URI object" )
The parsed uri
since: 2.0.00
This object is suitable for using with "APR::URI::rpath"
"unescape_url"
Unescape URLs
Apache2::URI::unescape_url($url);
obj: $url ( string )
The URL to unescape
ret: no return value
The argument $url is now unescaped
since: 2.0.00
Example:
my $url = join '%20', qw(one two three);
Apache2::URI::unescape_url($url);
$url now contains the string:
"one two three";
See Also
"APR::URI", mod_perl 2.0 documentation.
Copyright
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
Authors
The mod_perl development team and numerous contributors.
perl v5.16.2 2011-02-07 apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::Apache2::URI(3)