What I am trying to do is check if the database query returned any records.
If no records returned then output a message else output results to a file.
Right now if I take out the if and else statements the code runs fine and sends the email. If no records returned the email sends the column... (4 Replies)
i have a file named file_names.dat where there are several files along with their path.
exp:
/data1/dir1/CTA_ACD_20071208.dat
/data1/dir1/CTA_DFG_20071208.dat
i want to write a script which will create a csv file with the name of the file and record count of that file
the output file... (4 Replies)
i use unix command to take the record count for a file1
awk 'END{print NR}' filename
i already have a file2 which conatin the count like
...
..
rec_cnt=100
..
..
I want to replace the record in the file2 using the record i take from file1.
suggest me some simple ways of doing it... (2 Replies)
Hello
can someone please advise.
I need to send records in a file that are over 10,000 characters long to a seperate file.
Any ideas?
Thanks (2 Replies)
Hi all
How to verify the number of records in case of delimited file, If the file has records. And then if it is not equal to mentioned no. of records, email is triggered and file is moved to bad directory path.
Example
-----
input file = a.txt
bad directory path : /usr/bin/bad (6 Replies)
Hi ,
I am having a text file with several records., it has a header record and trailer record. The header record has the number of rows (records) found in the text file and time-stamp. The footer record has the total number of records ( along with the header and trailer.,
Suppose:
wc -l... (4 Replies)
Hi all,
I have written a scripts which count number of lines in all the files in a directory and write in a text file. I don't know how to format it while writing. OS suns solaris 10
my scripts is as below
for i in /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/RIO_02-Aug-2012/ *.LOG
do
echo... (11 Replies)
I have lots of space on my system.
linux-e30c:~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 41G 3.4G 35G 9% /
/dev/sda3 91G 36G 51G 42% /home
/dev/sda2 99G 3.4G 91G 4% /usr
But still somehow the inode count has almost finished... (3 Replies)
Discussion started by: rupeshkp728
3 Replies
LEARN ABOUT REDHAT
pdl::reduce
Reduce(3) User Contributed Perl Documentation Reduce(3)NAME
PDL::Reduce -- a "reduce" function for PDL
DESCRIPTION
Many languages have a "reduce" function used to reduce the rank of an N-D array by one. It works by applying a selected operation along a
specified dimension. This module implements such a function for PDL by providing a simplified interface to the existing projection func-
tions (e.g. "sumover", "maximum", "average", etc).
SYNOPSIS
use PDL::Reduce;
$a = sequence 5,5;
# reduce by adding all
# elements along 2nd dimension
$b = $a->reduce('add',1);
@ops = $a->canreduce; # return a list of all allowed operations
FUNCTIONS
reduce
reduce dimension of piddle by one by applying an operation along the specified dimension
$a = sequence 5,5;
# reduce by adding all
# elements along 2nd dimension
$b = $a->reduce('add',1);
$b = $a->reduce('plus',1);
$b = $a->reduce('+',1); # three ways to do the same thing
[ As an aside: if you are familiar with threading you will see that this is actually the same as
$b = $a->mv(1,0)->sumover
]
NOTE: You should quote the name of the operation (1st arg) that you want "reduce" to perform. This is important since some of the names are
identical to the names of the actual PDL functions which might be imported into your namespace. And you definitely want a string as argu-
ment, not a function invocation! For example, this will probably fail:
$b = $a->reduce(avg,1); # gives an error from invocation of 'avg'
Rather use
$b = $a->reduce('avg',1);
"reduce" provides a simple and unified interface to the projection functions and makes people coming from other data/array languages hope-
fully feel more at home.
$result = $pdl->reduce($operation [,$dim]);
"reduce" applies the named operation along the specified dimension reducing the input piddle dimension by one. If the dimension is omitted
the operation is applied along the first dimension. To get a list of valid operations see canreduce.
canreduce
return list of valid named "reduce" operations Some common operations can be accessed using a number of names, e.g. '+', "add" and "plus"
all sum the elements along the chosen dimension.
@ops = PDL->canreduce;
This list is useful if you want to make sure which operations can be used with "reduce".
AUTHOR
Copyright (C) 2000 Christian Soeller (c.soeller@auckland.ac.nz). All rights reserved. There is no warranty. You are allowed to redistribute
this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is sepa-
rated from the PDL distribution, the copyright notice should be included in the file.
perl v5.8.0 2001-07-07 Reduce(3)