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 names. I would like to send a message instead of the column heading.
Here is my code can anyone help?
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)
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)
recod,amount,noofaccount,count
98,+00000187865779787,00319,000000640/
99,+00000187865779787,00001,000000642/
thsi is my input file my question is
1) Reduce the count on the 98 record by 2 (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)
We have the below records where we need record count of every 30 minute like 00:01 to 00:30 so in that we will have 48 record count in 24 hrs , and also we need sum of record count from 00:01 to 23:30. Please find sample data as well.
00:01 21
00:02 23
00:03 34
00:04 34
00:05 30... (10 Replies)
Discussion started by: nadeemrafikhan
10 Replies
LEARN ABOUT DEBIAN
btarcmp
BTARCMP(1) General Commands Manual BTARCMP(1)NAME
btarcmp - a diff for Barry tar backup files
SYNOPSIS
btarcmp [-b][-d db][-D db][-h][-I charset][-P][-S][-v] tar0 tar1
DESCRIPTION
btarcmp takes two Barry backup tar files on the command line, and displays the differences it finds between them. If records can be
parsed, individual field differences are also displayed. Added and removed records are noted. Differences in database availability are
noted as well. If unable to parse the records, hex dumps are used.
OPTIONS -b Use brief filename markers. Useful when tar filenames are extremely long.
-d db Name of database to compare. Can be used multiple times to compare multiple databases. If not specified, all databases are com-
pared.
-D db Name of database to skip. Can be used multiple times. Overrides all other database selection options.
-h Show summary of options.
-I charset
Specifies the iconv charset to use for converting international strings. The Blackberry uses the WINDOWS-1252 charset, which is
incompatible with the more common code pages used in Linux. The most useful charset to use with this option is UTF-8, and is highly
recommended. Any other charset available via 'iconv --list' can be used here too, but may not be successful for some character con-
versions.
-S Displays list of known database records, which can be parsed.
-v Verbose output, which includes record data of added and deleted records in the output. If used twice, hex data is printed as well.
AUTHOR
btarcmp is part of the Barry project.
SEE ALSO
http://www.netdirect.ca/barry
January 20, 2010 BTARCMP(1)