I need to read the contents of a file. Then I need to grep for a keyword and replace part of the grepped line based on the condition of previous and present line.
Example input file:
Desired output file
I am trying to use a perl script to implement this.
Hi all,
I appreciate the enormous amount of knowledge that flows in this forum.
I am an average UNIX user. I have many files with lines like the below. I have separated each line with space for ease of reading. I need to replace the first occurance of "/00" with null on those lines that have... (6 Replies)
Hi,
I have a Line input for awk as follows
DROP MATERIALIZED VIEW MCR.COMM_STACK;
CREATE MATERIALIZED VIEW "MCR"."COMM_STACK"
ON PREBUILT TABLE WITHOUT REDUCED PRECISION
USING INDEX
REFRESH FAST ON DEMAND START WITH sysdate+0 NEXT SYSDATE + 7
WITH PRIMARY KEY USING DEFAULT... (3 Replies)
Hi,
I have a folder which contains multiple config.xml files and one input file, Please see the below format.
Config Files format looks like :-
Code:
<application name="SAMPLE-ARCHIVE">
<NVPairs name="Global Variables">
<NameValuePair>
... (0 Replies)
Given this row:
|lastname1|middlename1|firstname1|lastname2|middlename2|firstname2
produce this result:
|lastname|middlename|firstname
where the resultant names are based on the presence of the #2 names above. I.e., if a #2 name is passed (usually will be null,) use that - otherwise... (8 Replies)
I'm looking for an awk or (preferably) sed solution to search a pipe delimited file for any occurrence of an email address that does not include a designed domain, and replace the email address with a blank. E.g.
hello|smith@designateddomain.com|jones@anotherdomain.edu|1234|
turns into:
... (2 Replies)
I have a environment property file which contains:
Input file:
value1 = url1
value2 = url2
value3 = url3 and so on.
I need to search all *.xml files under directory for value1 and replace it with url1.
Same thing I have to do for all values mentioned in input file. I need script in unix bash... (7 Replies)
Hi Guys,
I am having below file which holds data like this
file.txt
name,id,flag
apple,1,Y
apple,2,N
mango,1,Y
mango,2,Y
I need to read the above file and frame a query like this
hive -s -e "create apple_view as select 1 from main_table;"
hive -s -e "create mango_view as select... (11 Replies)
Discussion started by: rohit_shinez
11 Replies
LEARN ABOUT DEBIAN
poe::component::client::http::requestfactory
POE::Component::Client::HTTP::RequestFactory(3pm) User Contributed Perl Documentation POE::Component::Client::HTTP::RequestFactory(3pm)NAME
POE::Component::Client::HTTP::RequestFactory - an HTTP request factory object
VERSION
version 0.947
SYNOPSIS
# Used internally by POE::Component::Client::HTTP
CONSTRUCTOR
new
Create a new request factory object. It expects its parameters in a hashref.
The following parameters are accepted. They are explained in detail in POE::Component::Client::HTTP.
o Agent
o MaxSize
o Streaming
o Protocol
o From
o CookieJar
o NoProxy
o Proxy
o FollowRedirects
o Timeout
METHODS
timeout [$timeout]
Method that lets you query and/or change the timeout value for requests created by this factory.
is_streaming
Accessor for the Streaming parameter
agent
Accessor to the Agent parameter
from
getter/setter for the From parameter
create_request
Creates a new POE::Component::Client::HTTP::Request
max_response_size
Method to retrieve the maximum size of a response, as set by the "MaxSize" parameter to Client::HTTP's "spawn()" method.
block_size
Accessor for the Streaming parameter
frob_cookies $response
Store the cookies from the HTTP::Response parameter passed into our cookie jar
max_redirect_count [$count]
Function to get/set the maximum number of redirects to follow automatically. This allows you to retrieve or modify the value you passed
with the FollowRedirects parameter to Client::HTTP's "spawn" method.
parse_proxy $proxy
This static method is used for parsing proxies. The $proxy can be array reference like [host, port] or comma separated string like
"http://1.2.3.4:80/,http://2.3.4.5:80/".
parse_proxy() returns an array reference of two-element tuples (also array ferences), each containing a host and a port:
[ [ host1, port1 ],
[ host2, port2 ],
...
]
perl v5.14.2 2012-06-03 POE::Component::Client::HTTP::RequestFactory(3pm)