hi
i am pretty new to unix .i am ETL guy
I need a unix script to take row count of a file and write it to another file
the problem with wc-l is it include filename also
wc -l abc.dat
will give me like 1000 abc.dat
i just want 1000 to be written
can u just take 2 min to write a simple... (1 Reply)
Hi,
Suppose i have a inputfile in csv format.
How to use awk to count 'the number of nonempty columns in each row' minus one, and add the value as a new column in the end
For cosmetic reason, it's even better to include a descriptive label for the last column in the first row.
for... (2 Replies)
Hi All,
I have the following input which i want to process using AWK.
Rows,NC,amount
1,1202,0.192387
2,1201,0.111111
3,1201,0.123456
i want the following output
count of rows = 3 ,sum of amount = 0.426954
Many thanks (2 Replies)
Could anybody help with this?
I have input below .....
david,39
david,39
emelie,40
clarissa,22
bob,42
bob,42
tim,32
bob,39
david,38
emelie,47
what i want to do is count how many names there are with different ages, so output would be like this ....
david,2
emelie,2
clarissa,1... (3 Replies)
This is the source file, we called it errorlist.out
196 server_a server_unix_2 CD
196 server_b server_win_1 CD
196 server_c server_win_2 CD
196 server_bd server_unix_2 CD
196 server_d server_unix_2 CD
196 server_es server_win_1 CD
196 ... (14 Replies)
Hi All,
I need to extract duplicate rows from a file and write these bad records into another file. And need to have a count of these bad records.
i have a command
awk '
{s++}
END {
for(i in s) {
if(s>1) {
print i
}
}
}' ${TMP_DUPE_RECS}>>${TMP_BAD_DATA_DUPE_RECS}... (5 Replies)
Greetings!
I have been trying to find out a way to take a CSV file with a large number of rows, and a very large number of columns (in the thousands) and convert the rows to a single column of data, where the first row is a header representing the attribute name and the subsequent series of... (3 Replies)
Hi,
I need a solaris shell script to read multiple files and count number of unique name rows(strings) from those files. The input and output should be like this
Input:
file 1
abc
cde
abc ... (9 Replies)
we want the count of number of records to be printed on each row.
For Ex:
if there are 5 records on one unique id , the count "5'' should be printed on each record in other column. Please help for this. I am using unix & Cygwin.
Below are sample records:
KCZ0650473... (2 Replies)
I have a file with 48 rows. I am counting 6 rows and adding 6 to that number and repeating the operation, and then output the value in column 1. For the second column, I would like to get sort of a binary output (1s and 2s) every 3rd row. This is what I have:
awk '{print ++src +... (1 Reply)
Discussion started by: Xterra
1 Replies
LEARN ABOUT DEBIAN
template::timer
Timer(3pm) User Contributed Perl Documentation Timer(3pm)NAME
Template::Timer - Rudimentary profiling for Template Toolkit
VERSION
Version 1.00
SYNOPSIS
Template::Timer provides inline timings of the template processing througout your code. It's an overridden version of Template::Context
that wraps the "process()" and "include()" methods.
Using Template::Timer is simple.
use Template::Timer;
my %config = ( # Whatever your config is
INCLUDE_PATH => '/my/template/path',
COMPILE_EXT => '.ttc',
COMPILE_DIR => '/tmp/tt',
);
if ( $development_mode ) {
$config{ CONTEXT } = Template::Timer->new( %config );
}
my $template = Template->new( \%config );
Now when you process templates, HTML comments will get embedded in your output, which you can easily grep for. The nesting level is also
shown.
<!-- TIMER START: L1 process mainmenu/mainmenu.ttml -->
<!-- TIMER START: L2 include mainmenu/cssindex.tt -->
<!-- TIMER START: L3 process mainmenu/cssindex.tt -->
<!-- TIMER END: L3 process mainmenu/cssindex.tt (17.279 ms) -->
<!-- TIMER END: L2 include mainmenu/cssindex.tt (17.401 ms) -->
....
<!-- TIMER END: L3 process mainmenu/footer.tt (3.016 ms) -->
<!-- TIMER END: L2 include mainmenu/footer.tt (3.104 ms) -->
<!-- TIMER END: L1 process mainmenu/mainmenu.ttml (400.409 ms) -->
Note that since INCLUDE is a wrapper around PROCESS, calls to INCLUDEs will be doubled up, and slightly longer than the PROCESS call.
AUTHOR
Andy Lester, "<andy at petdance.com>"
BUGS
Please report any bugs or feature requests to "bug-template-timer at rt.cpan.org", or through the web interface at <http://rt.cpan.org>. I
will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
Thanks to Randal Schwartz, Bill Moseley, and to Gavin Estey for the original code.
COPYRIGHT & LICENSE
This library is free software; you can redistribute it and/or modify it under the terms of either the GNU Public License v3, or the
Artistic License 2.0.
* http://www.gnu.org/copyleft/gpl.html
* http://www.opensource.org/licenses/artistic-license-2.0.php
perl v5.12.4 2009-03-07 Timer(3pm)