Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
hi all!
i have a working that looks like this...
file1
MALE JOHN
MALE ANJO
FEMALE ANNE
MALE JAMES
FEMALE HONEY
FEMALE IZA
what i want to do is insert "M" when the first string is "MALE" and insert "F" when the first string is "FEMALE".
file1
M MALE ... (10 Replies)
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Hi,
I need to replace and append a string in a text if grep is true. For eg:
grep ABC test.txt | grep -v '\.$' | awk {'print $4'} | sed "s/ ?
How do I replace all instances of "print $4" using sed with another sring? Eg of the string returned will be,
lx123
web222
xyz
Want to... (8 Replies)
I need to search this "<CardinalMPI>" string and replace the same string above two lines of the string.
Nov 16, 2012 12:58:34 PM
INFO: Centinel LookUp ResponseXML : <CardinalMPI>
<ReasonCode></ReasonCode>
<ErrorDesc></ErrorDesc>
<MerchantReferenceNumber></MerchantReferenceNumber>... (4 Replies)
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Hi Team
I have an huge xml where i need to search for a ceratin numbers. For example
2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () -
<?xml version="1.0" encoding="UTF-8"... (5 Replies)
Discussion started by: Kannannair
5 Replies
LEARN ABOUT DEBIAN
sdfapi
SDFAPI(1) User Contributed Perl Documentation SDFAPI(1)NAME
sdfapi - API Extraction Utility
PURPOSE
sdfapi extracts Application Programming Interface information from (Perl) source code.
USAGE
usage : sdfapi [-h[help]] [-o[out_ext]]
[-l[log_ext]] [-O[out_dir]] [-f fmt_tag]
[-p[pattern]] [-s sym_type,..] [-j]
file ...
purpose: extract the API from a (perl) library
version: 2.000 (SDF 2.001)
The options are:
Option Description
-h display help on options
-o output file extension
-l log file extension
-O output to input file's (or explicit) directory
-f output format tag
-p only symbols matching pattern
-s only symbols of these types
-j add SDF-style hypertext jumps from each symbol
DESCRIPTION
The -h option provides help. If it is specified without a parameter, a brief description of each option is displayed. To display the
attributes for an option, specify the option letter as a parameter.
By default, generated output goes to standard output. To direct output to a file per input file, use the -o option to specify an extension
for output files. If the -o option is specified without a parameter, an extension of out is assumed.
Likewise, error messages go to standard error by default. Use the -l option to create a log file per input file. If the -l option is
specified without a parameter, an extension of log is assumed.
By default, generated output and log files are created in the current directory. Use the -O option to specify an explicit output directory.
If the -O option is specified without a parameter, the input file's directory is used.
The format of the output can be controlled using the -f option. Supported formats are std and concise. The default is std. std format is:
require "abc.pl";
$myvar = ...
$result = &myfunc($myparams);
concise format has fewer blank lines and uses 1 line per symbol.
A comma-separated list of symbol types to output can be specified using the -s option. Supported symbol types are:
o sub - subroutines
o var - variables
The default is to extract all symbols.
The -p option is used to extract only a subset of the symbols. If not supplied, the pattern is symbols beginning with a letter. If supplied
without an option, the pattern defaults to all symbols. If perl libraries use the coding convention that symbols beginning with underscore
are private, then -p_ can be used to extract the private symbols.
The -j option can be used to request SDF-style hypertext jumps be added for each symbol. The jump target is lib_sym where:
o lib is the library name
o sym is the symbol name.
LIMITATIONS AND FUTURE DIRECTIONS
The only language currently supported is Perl.
It would be useful to extract messages from the scripts too. This would require a new utility called sdfmsg say, which searched through the
source (including libraries) for AppMsg and AppExit calls.
Internally, it may be better to implement formats via routines. This would give better control over output. e.g. it would be up to the
routine to decide if it wanted to output the 'require' header.
perl v5.12.4 2011-11-09 SDFAPI(1)