10-05-2009
Hi,
Thanks for your response.
I can't extract the first 2 characters of valuez as sometimes the value in the first field of the first file can be up to 4 digits long.
The 2nd file I'm processing is quite big - around 64,000 files.
I'm not sure what you mean by asking for optimisation - is that a perl option?
Thanks again for your help
10 More Discussions You Might Find Interesting
1. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
2. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
3. Shell Programming and Scripting
Hi Friends, I have a tuff time with regular expressionss. Please let me know how to make this happen as it consumed lots of my time but in vain. Here is the sample text file i need to match for. I need to search for pattern1 removed, if it matches then search for pattern types either SE\ or... (2 Replies)
Discussion started by: nmattam
2 Replies
4. Shell Programming and Scripting
using perl
Hi All, i was wondering if anyone can solve how to extract the full tag from the xml line ie not sure what to put in the m// to get the string
"/data/TOP471//context_data/instruments.txt"
I basically want the above filename in a variable for further processing...
$_ =" ... (0 Replies)
Discussion started by: satnamx
0 Replies
5. Shell Programming and Scripting
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies
6. Shell Programming and Scripting
Hi,
I am trying to write a script which parses a log file and will eventually put the values in an array so that I can perform some math on it. In this file I am only interested in the last 200 lines so here is the command I use to display the contents in a manageable manner.
tail -200... (3 Replies)
Discussion started by: Filter500
3 Replies
7. HP-UX
Hi Experts,
I am executing multiple instances(in parallel) of perl script on HP-UX box.
OS is allocating substantial amount of CPU to these perl processes,resulting higher cpu utilization.
Glance always shows perl processes are occupying majority of the CPU resource. It is causing slower... (2 Replies)
Discussion started by: sai_2507
2 Replies
8. Shell Programming and Scripting
Hi all,
i have a peice of Perl script like this:
foreach (@line) {
@tmp = split /;/,$_;
#print "Line is: $_\n";
switch($tmp){
case m/p60/i {
push @p60, , $tmp ];
... (7 Replies)
Discussion started by: arrals_vl
7 Replies
9. Shell Programming and Scripting
Help needed urgently please.
I have a large file - a few hundred thousand lines.
Sample
CP START ACCOUNT
1234556
name 1
CP END ACCOUNT
CP START ACCOUNT
2224444
name 1
CP END ACCOUNT
CP START ACCOUNT
333344444
name 1
CP END ACCOUNT
I need to split this file each time "CP START... (7 Replies)
Discussion started by: frustrated1
7 Replies
10. Shell Programming and Scripting
This basic code works.
I have a very long list, almost 10000 lines that I am building into the array. Each line has either 2 or 3 fields as shown in the code snippit. The array elements are static (for a few reasons that out of scope of this question) the list has to be "built in".
It... (5 Replies)
Discussion started by: sumguy
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)