How do I extract 5th to 10th characters of string as given below stored in a shell variable.
"ab cd ef gh ij kl"
How is cut to be used on this?
Thanks for any help. (1 Reply)
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
i want to cut all the entries from the /etc/passwd file in which the uid is> 500
for this i was writing this ,m quiet new to all this.. scripting
but on the 6th n 8th line ,, i hav to specify a line number .. to get the commnd working .. but i want to use variable i instead of that ,,... (2 Replies)
Hi All,
I am writing a shell script for which I am stuck with an extraction part.
I arrived till extraction of a path of file. Lets take an example.
I now have a file which contains following one line:
2348/home/userid/mydir/any_num_dir/myfile.text
Now I want to extract only... (2 Replies)
I am trying to extract a hyperlink from a html document using awk. I have managed to output in the format... href="index.html"> where i would like it just to output index.html. Any ideas on how i would do this?
Thanks (2 Replies)
Hi ,
I have input file and i want to extract below strings
<msisdn xmlns="">0492001956</ msisdn> => numaber inside brackets
<resCode>3000</resCode> => 3000 needs to be extracted
<resMessage>Request time
getBalances_PSM.c(37): d out</resMessage></ns2:getBalancesResponse> => the word... (14 Replies)
Hi All,
I am pretty new to pattern matching and extraction using shell scripting. Could anyone please help me in extracting the word matching a pattern from a line in bash.
Input Sample (can vary between any of the 3 samples below):
1) Adaptec SCSI RAID 5445
2) Adaptec SCSI 5445S RAID
3)... (8 Replies)
Hi,
I have a file which is an extract of jil codes of all autosys jobs in our server.
Sample jil code:
**************************
permission:gx,wx
date_conditions:yes
days_of_week:all
start_times:"05:00"
condition: notrunning(appDev#box#ProductLoad)... (1 Reply)
I have a string:
2015-04-16 07:30:05,625000 +0900 xxxx.com
I just want to extract the time from the above line I am using the below syntax
x=~ /(.*) (\d+)\:(\d+)\:(\d+),(.*)\.com/
$time = $2 . ':' . $3 . ':' . $4;
print $time
But it is not working. Can some1 please help (2 Replies)
Hello.
First best wishes for everybody.
here is the input file ("$INPUT1") contents :
BASH_FUNC_message_begin_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_debug%%=() { local -a L_ARRAY;
BASH_FUNC_message_end_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_error%%=() { local... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT SUSE
soap::fault
SOAP::Fault(3) User Contributed Perl Documentation SOAP::Fault(3)NAME
SOAP::Fault - encapsulates SOAP faults prior to their serialization or after their deserialization
DESCRIPTION
This class encapsulates SOAP faults prior to their serialization or after their deserialization. The methods available are a constructor
and four accessors. Each accessor creates an object on demand, just as the other classes do, when called as a static method. Like other
accessors in the SOAP::Lite package, they return the object itself when setting the attribute.
GENERATING A SOAP FAULT
To generate a SOAP Fault simply issue a Perl die command on the server side as you might normally. The SOAP processor will intercept the
die command and return a SOAP Fault, using the string passed to the die command as the faultstring, to the client making the call. If you
require having more control over the SOAP Fault returned to the client, then simply pass a SOAP::Fault object to the die command and the
SOAP processor will behave accordingly. For example:
die SOAP::Fault->faultcode('Server.Custom') # will be qualified
->faultstring('Died in server method')
->faultdetail(bless {code => 1} => 'BadError')
->faultactor('http://www.soaplite.com/custom');
METHODS
new(optional data)
$fault = SOAP::Fault->new(faultcode => 'Server');
Explicitly creates a new SOAP::Fault object. Any of the four attributes represented next by accessor methods may be passed in the
argument list with values immediately following their attribute name.
faultcode(optional value)
$fault->faultcode('MethodUnknown');
Returns the current fault code or sets it if a value is given.
faultstring(optional value)
$fault->faultstring("There is no $method here");
Returns or sets the fault string.
faultactor(optional value)
$fault->faultcode($header->actor);
Returns or sets the fault-actor element. Note that the actor isn't always required in a SOAP fault.
faultdetail(optional value)
$fault->faultcode(bless { proxy => $ip }, 'Err');
Returns or sets the fault's detail element. Like the actor, this isn't always a required element. Note that fault detail content in a
message is represented as tag blocks. Thus, the values passed to this accessor when setting the value are either SOAP::Data objects, or
more general blessed hash references.
In addition to these methods, the SOAP::Fault package also provides detail as an alias for faultdetail. The former is the actual name of
the element with SOAP faults, but the latter name is less ambiguous when regarded with the rest of the SOAP::Lite package. Objects of this
class also have a special stringification enabled. If an object is printed or otherwise stringified, the value produced is faultcode:
faultstring, with the attribute values of the object.
SEE ALSO
SOAP::Data, SOAP::Header, SOAP::SOM
ACKNOWLEDGEMENTS
Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from Programming
Web Services with Perl, mainly the SOAP::Lite reference found in Appendix B.
COPYRIGHT
Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORS
Paul Kulchenko (paulclinger@yahoo.com)
Randy J. Ray (rjray@blackperl.com)
Byrne Reese (byrne@majordojo.com)
perl v5.12.1 2008-03-15 SOAP::Fault(3)