Sponsored Content
Top Forums Shell Programming and Scripting Replacing partial content of a file. Post 302909309 by itkamaraj on Wednesday 16th of July 2014 04:56:24 AM
Old 07-16-2014
try with nawk (instead of your sed command )

Code:
nawk -F: -v url="$ECIFSERVER" 'BEGIN{OFS=":"}/service.url/{$2=url}1' environment.properties > tmp.properties

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing a paragraph between pattern , with the content 4m another file

hi, i wanted to put the output of file f1 into the pattern space of file f2 f1: wjwjwjwjwjwjwj //these line go in file f2 jwjwjwjwjwjjwjw wjwjwjwjjwjwjwj f2: Pattern_start __________ //these are the line to be replaced __________ Pattern_end i m... (4 Replies)
Discussion started by: go4desperado
4 Replies

2. Shell Programming and Scripting

Query for replacing a string and keeping the non-replaced content

Hi experts, As i am a novice unix player...so need help for the below query...banged my head from quite a while...:confused: i have a set of html files, in which i need to search for string "Page"(case sensitive) and then replace the same with some numeric code ,say, "XXX1234". Here in... (2 Replies)
Discussion started by: rahulfhp
2 Replies

3. Shell Programming and Scripting

Replacing content from a list

Okay, so I am not quite sure the best way of going about this. I have a whole stack of files that need items replaced with a code corresponding to it. In particular, I am looking to replace the names of countries with the two letter iso country code. The files themselves are in csv format with... (4 Replies)
Discussion started by: johnlee
4 Replies

4. Shell Programming and Scripting

AWK - Print partial line/partial field

Hello, this is probably a simple request but I've been toying with it for a while. I have a large list of devices and commands that were run with a script, now I have lines such as: a-router-hostname-C#show ver I want to print everything up to (and excluding) the # and everything after it... (3 Replies)
Discussion started by: ippy98
3 Replies

5. Shell Programming and Scripting

Pattern Matching & replacing of content in file1 with file2

I have file 1 & file 2 with content mentioned below. I want to get the output as shown in file3. Requirement: check the content of column 1 & column 2, if value of column 1 in file1 matches with first column of file2 then remaining columns(2&3) of file2 should get replaced, also if value of... (4 Replies)
Discussion started by: siramitsharma
4 Replies

6. Shell Programming and Scripting

How to replace partial of string in file?

Hi Guys, I need replace part of string in a file. for example: ABC=123 CDE=122 DEF=456 ABC=123 DED=333 ABC=123 I need replace the value after ABC=, highlighted in red. I want to get following result; ABC=456 CDE=122 DEF=456 ABC=456 DED=333 ABC=456 Anybody can help me this. ... (8 Replies)
Discussion started by: ken6503
8 Replies

7. Shell Programming and Scripting

Partial content greping into a 3rd file

Hi, I do have couple of files in folder. The names of each of the files have a pattern. B_A17_A17_1T.txt B_A17_A17_2T.txt B_A17_A17_3T.txt B_A17_A17_7T.txt ..... ..... B_A17_A17_45T.txt Each of the above files have the same pattern of data with 4 columns and have an header for... (10 Replies)
Discussion started by: Kanja
10 Replies

8. Shell Programming and Scripting

How to remove exisiting file content from a file and have to append new file content?

hi all, i had the below script x=`cat input.txt |wc -1` awk 'NR>1 && NR<'$x' ' input.txt > output.txt by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

9. Shell Programming and Scripting

Partial file pulling

I am connecting to another server through sftp. I am running one batch script to pull file from another server. sometimes i am receiving partial files. I am using below commands in batch script. ls -ltr new.txt mget new.txt bye The file is of 1 MB only.In most of the cases , i received... (6 Replies)
Discussion started by: srinath01
6 Replies

10. UNIX for Beginners Questions & Answers

awk to update file with partial matching line in another file and append text

In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
Discussion started by: cmccabe
4 Replies
SOAP::WSDL::Client(3pm) 				User Contributed Perl Documentation				   SOAP::WSDL::Client(3pm)

NAME
SOAP::WSDL::Client - SOAP::WSDL's SOAP Client SYNOPSIS
use SOAP::WSDL::Client; my $soap = SOAP::WSDL::Client->new({ proxy => 'http://www.example.org/webservice/test' }); $soap->call( \%method, $body, $header); METHODS
call $soap->call( \%method, @parts ); %method is a hash with the following keys: Name Description ---------------------------------------------------- operation operation name soap_action SOAPAction HTTP header to use style Operation style. One of (document|rpc) use SOAP body encoding. One of (literal|encoded) The style and use keys have no influence yet. @parts is a list containing the elements of the message parts. For backward compatibility, call may also be called as below: $soap->call( $method, @parts ); In this case, $method is the SOAP operation name, and the SOAPAction header is guessed from the first part's namespace and the operation name (which is mostly correct, but may fail). Operation style and body encoding are assumed to be document/literal Configuration methods outputxml $soap->outputxml(1); When set, call() returns the raw XML of the SOAP Envelope. set_content_type $soap->set_content_type('application/xml; charset: utf8'); Sets the content type and character encoding. You probably should not use a character encoding different from utf8: SOAP::WSDL::Client will not convert the request into a different encoding (yet). To leave out the encoding, just set the content type without appending charset like this: $soap->set_content_type('text/xml'); Default: text/xml; charset: utf8 set_prefix $soap->set_prefix('ns2'); If set, alters the serialization of the request XML such that the supplied value is used as a namespace prefix for SOAP method calls. By way of example, the default XML serialization returns something like this: <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <getElementId xmlns="http://services.exmaple.org/"> <elementId>12345</elementId> </getElementId> </SOAP-ENV:Body> </SOAP-ENV:Envelope> If the sample set_prefix() call above is used prior to calling your SOAP method, the XML serialization returns this instead: <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://services.example.org/"> <SOAP-ENV:Body> <ns2:getElementId> <elementId>12345</elementId> </ns2:getElementId> </SOAP-ENV:Body> </SOAP-ENV:Envelope> This is useful in cases where, for instance, one is communicating with a JAX <https://jax-ws.dev.java.net/> webservice, which tends to understand the latter but not the former. Note that this implementation is currently limited to a single additional namespace; if you require multiple custom namespaces, you should probably look into creating your own serializer. Features different from SOAP::Lite SOAP::WSDL does not aim to be a complete replacement for SOAP::Lite - the SOAP::Lite module has its strengths and weaknesses and SOAP::WSDL is designed as a cure for the weakness of little WSDL support - nothing more, nothing less. Nonetheless SOAP::WSDL mimics part of SOAP::Lite's API and behaviour, so SOAP::Lite users can switch without looking up every method call in the documentation. A few things are quite different from SOAP::Lite, though: SOAP request data SOAP request data may either be given as message object, or as a hash ref (in which case it will automatically be encoded into a message object). Return values The result from call() is not a SOAP::SOM object, but a message object. Message objects' classes may be generated from WSDL definitions automatically - see SOAP::WSDL::Generator::Typelib on how to generate your own WSDL based message class library. Fault handling SOAP::WSDL::Client returns a fault object on errors, even on transport layer errors. The fault object is a SOAP1.1 fault object of the following "SOAP::WSDL::SOAP::Typelib::Fault11". SOAP::WSDL::SOAP::Typelib::Fault11 objects are false in boolean context, so you can just do something like: my $result = $soap->call($method, $data); if ($result) { # handle result } else { die $result->faultstring(); } outputxml SOAP::Lite returns only the content of the SOAP body when outputxml is set to true. SOAP::WSDL::Client returns the complete XML response. Auto-Dispatching SOAP::WSDL::Client does not support auto-dispatching. This is on purpose: You may easily create interface classes by using SOAP::WSDL::Client and implementing something like sub mySoapMethod { my $self = shift; $soap_wsdl_client->call( mySoapMethod, @_); } You may even do this in a class factory - see wsdl2perl for creating such interfaces. TROUBLESHOOTING
Accessing protected web services Accessing protected web services is very specific for the transport backend used. In general, you may pass additional arguments to the set_proxy method (or a list ref of the web service address and any additional arguments to the new method's proxy argument). Refer to the appropriate transport module for documentation. LICENSE AND COPYRIGHT
Copyright 2004-2007 Martin Kutter. This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself AUTHOR
Martin Kutter <martin.kutter fen-net.de> REPOSITORY INFORMATION
$Rev: 851 $ $LastChangedBy: kutterma $ $Id: Client.pm 851 2009-05-15 22:45:18Z kutterma $ $HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $ perl v5.10.1 2010-12-21 SOAP::WSDL::Client(3pm)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy