None of our Perl experts are jumping on this, so I guess I'll give it a try. This is what I wrote:
That last loop is just to prove that I had populated an array called ServerName. Notice the two lines that I commented. I really wanted to combine them into a single line and lose that $array scalar. But I could not find the right syntax. Can anyone kick that ball over the goalline for me?
And no fair rewriting it to use a more sensible data structure. I gave the OP what he asked for. I realize the requirements are a little odd.
Hello,
I am building an .xls file extracting info from a DB to be eventually emailed. All is good except how do I put in a header row.. like date, name of report etc. before the columns with the actual column name and data?
Thanks for any assistance.. the below is after I have signed into... (11 Replies)
So, I have a massive file with thousands of columns
I want a list of the headers in one column in another file.
So I need to strip off the top line (can use head-1)
But how can I convert from this format:
A B C D E F G
to
A
B
C
D
E
F
G (6 Replies)
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Hi All,
File contains header row.. we need to exclude the header row...no need to validate the first row in the file.
Data in the file should take valid data(two columns)..we need to exclude the more than two columns in the file except the first line.
email|firstname
a|123|100
b|345... (4 Replies)
Hi,
I have an input like this
1 2 3 4
2 3 4 5
4 5 6 7
I would like to count the no. of columns and print a header with a prefix "Col".
I would also like to count the no. of rows and print as first column with each line number with a prefix "Row"
So, my output would be
... (2 Replies)
Hi There!
I am saving the file count of all files in a directory to an output file using:
wc -l * > FileCount.txt
I get:
114 G4SXORD
3 G4SXORH
0 G4SXORP
117 total
But this count includes header and footer. I want to subtract 2 from the count and get
... (7 Replies)
Hi All,
i have script like ...
"TYPE_ID" "ID" "LIST_ID"
"18" "52010" "1059"
"18" "52010" "1059"
"18" "52010" "1059"
"18" "52010" "1059"
i am using the below code it's not taking the header row.
awk -F"\t" -v file=test1.txt -v file1=test2.txt ' {
if(... (7 Replies)
Hi,
So I am trying to print the first row(header) first column alongwith the matched value. But I am not sure how do I print the same, by matching a pattern located in the file
eg
File contents
Name Place
Jim NY
Jill NJ
Cathy CA
Sam TX
Daniel FL
And what I want is... (2 Replies)
I am just trying to insert the word "Index" using awk. The below is close but seems to add the word at the end and I can not get the syntax correct to add from the beginning. Thank you :).
awk -F'\t' -v OFS='\t' '{ $-1=$-1 OFS "Index"}$1=$1' file
current output
Chr Start End ... (3 Replies)
The awk below does put in VUS in the 9th field but I can not seem to skip the header then add the VUS. I tried to incorporate NR >=2 and NR > 1 with no luck. Thank you :).
input
Chr Start End Ref Alt Func.refGene PopFreqMax CLINSIG Classification
chr1 43395635 ... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT DEBIAN
ropkg::simba::mirrors
RoPkg::Simba::Mirrors(3pm) User Contributed Perl Documentation RoPkg::Simba::Mirrors(3pm)NAME
RoPkg::Simba::Mirrors
VERSION
0.2.2
DESCRIPTION
RoPkg::Simba::Mirrors is a class used to count and get the mirrors from the database.
SYNOPSIS
!#/usr/bin/perl
use RoPkg::DB;
use RoPkg::Simba::Mirrors;
sub main {
my $dbp = new RoPkg::DB();
$dbp->Add('dbi:mysql:database=mysql;host=localhost',
'root',
'',
'local');
my $m = new RoPkg::Simba::Mirrors(dbo => $dbp, dbo_method => 'db_local');
print $m->Count,' mirrors found in database',$/;
}
main();
SUBROUTINES /METHODS
new()
The class constructor. At this moment, it just calls RoPkg::DBObject->new() . Please read the RoPkg::DBObject manual page for more
information about the new() parameters.
Count($fields)
Returns the number of mirrors from database. The $fields parameter contains a list of WHERE clauses. For more details of $fields see
SQL::Abstract.
Get($fields, $orderby)
Returns a array of RoPkg::Simba::Mirror objects. The mirrors are read from the database. The $fields parameter contains a list of WHERE
clauses. For more details of $fields see SQL::Abstract. $orderby is a reference to a array holding the fields specification used for
sorting the data.
DIAGNOSTICS
Unpack the source, and use 'make test' command
CONFIGURATION AND ENVIRONMENT
This module does not use any configuration files or environment variables.
DEPENDENCIES
RoPkg::DBCollection and RoPkg::Excludes
INCOMPATIBILITIES
None known to the author
BUGS AND LIMITATIONS
None known to the author
PERL CRITIC
This module is perl critic level 2 compliant
SEE ALSO
RoPkg::Simba RoPkg::Simba::Mirror SQL::Abstract
AUTHOR
Subredu Manuel <diablo@iasi.roedu.net>
LICENSE AND COPYRIGHT
Copyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the
same terms as Perl itself. The LICENSE file contains the full text of the license.
perl v5.14.2 2006-07-04 RoPkg::Simba::Mirrors(3pm)