I have a file containing the lines similar to the following entries:
File1.txt:
.....
-rw-r--r-- 1 root staff 4110 Aug 7 17:02 XXX_OrderNum1_date1_time1.txt
-rw-r--r-- 1 root staff 4110 Aug 7 17:02 XXX_OrderNum2_date2_time1.txt
-rw-r--r-- 1 root staff ... (3 Replies)
Dear All,
I have a file name pointer.unl. It's contains the information below:
O|A|4560333089|PBS|AU1|01/04/2003|30/04/2006|D|IGCD|
O|A|4562222089|PBN|AU1|01/02/2006|31/01/2008|D|04065432|
O|A|3454d00089|PKR|AU1|01/03/2008||R|sdcdc|
I only need to extract first... (11 Replies)
Hi everybody
I have some problems with PERL programming.
I have a file with two columns, both with numeric values.
I have to extract the values > 50 from the 2nd columns and sum them among them.
The I have to sum the respective values in the first column on the same line and, at the end, I... (6 Replies)
Can Anyone tell me how to extract the second column of a xls sheet
And compare the content of each row of the column with a .h file.
xls sheet is having only one spreadsheet. (2 Replies)
Hi everyone,
i am new to perl programming, i have a problem in extracting single column from csv file. the column is the 20th column,
please help me..
at present i use this code
#!C:/perl/bin
use warnings;
use strict;
my $file1 = $ARGV;
open FILE1, "<$file1"
or die "Can't... (13 Replies)
Hi All,
Using below command to extract text from a file
grep -E "^.{20}5004" filename.rtf >> 5004This will give all lines with text 5004 starting at position 20.
The file filename.rtf contains several rows (millions). The four characters starting from 20 position is repeating in several... (4 Replies)
Hello Gurus
I have a source file which has the first line as header and the rest are the records
I need to extract the first column from the second line to extract a value
I/P
... (7 Replies)
Hi, it's my first time in this site.
I've a file that look likes
Edges 21 82
Edges 3 22
Edges 34 12
Edges 1 24
Edges 6 2
Edges 12 22
etc. I need extract just the second and third column with the space between them. Thanks:)
Please use code tags next time for your code and data. (4 Replies)
Hi,
I am trying with the below Perl one-liner using regular expression to extract the first and second column of a text file:
perl -p -e "s/\s*(\w+).*/$1/"
perl -p -e "s/\s*.+\s(.+)\s*/$1\n/"
whereas the text file's data looks like:
Error: terminated 2233
Warning: reboot 3434
Warning:... (3 Replies)
Discussion started by: royalibrahim
3 Replies
LEARN ABOUT DEBIAN
cpanplus::internals::extract
CPANPLUS::Internals::Extract(3perl) Perl Programmers Reference Guide CPANPLUS::Internals::Extract(3perl)NAME
CPANPLUS::Internals::Extract - internals for archive extraction
SYNOPSIS
### for source files ###
$self->_gunzip( file => 'foo.gz', output => 'blah.txt' );
### for modules/packages ###
$dir = $self->_extract( module => $modobj,
extractdir => '/some/where' );
DESCRIPTION
CPANPLUS::Internals::Extract extracts compressed files for CPANPLUS. It can do this by either a pure perl solution (preferred) with the
use of "Archive::Tar" and "Compress::Zlib", or with binaries, like "gzip" and "tar".
The flow looks like this:
$cb->_extract
Delegate to Archive::Extract
METHODS
$dir = _extract( module => $modobj, [perl => '/path/to/perl', extractdir => '/path/to/extract/to', prefer_bin => BOOL, verbose => BOOL, force
=> BOOL] )
"_extract" will take a module object and extract it to "extractdir" if provided, or the default location which is obtained from your
config.
The file name is obtained by looking at "$modobj->status->fetch" and will be parsed to see if it's a tar or zip archive.
If it's a zip archive, "__unzip" will be called, otherwise "__untar" will be called. In the unlikely event the file is of neither format,
an error will be thrown.
"_extract" takes the following options:
module
A "CPANPLUS::Module" object. This is required.
extractdir
The directory to extract the archive to. By default this looks something like:
/CPANPLUS_BASE/PERL_VERSION/BUILD/MODULE_NAME
prefer_bin
A flag indicating whether you prefer a pure perl solution, ie "Archive::Tar" or "Archive::Zip" respectively, or a binary solution like
"unzip" and "tar".
perl
The path to the perl executable to use for any perl calls. Also used to determine the build version directory for extraction.
verbose
Specifies whether to be verbose or not. Defaults to your corresponding config entry.
force
Specifies whether to force the extraction or not. Defaults to your corresponding config entry.
All other options are passed on verbatim to "__unzip" or "__untar".
Returns the directory the file was extracted to on success and false on failure.
perl v5.14.2 2014-09-29 CPANPLUS::Internals::Extract(3perl)