Sponsored Content
Full Discussion: Unix script enhancement
Top Forums Shell Programming and Scripting Unix script enhancement Post 302464488 by msrahman on Wednesday 20th of October 2010 09:45:37 AM
Old 10-20-2010
One success, another to go....

Thanks Chubler,
It worked. I am getting the output like this :
Message The total number of records in the file is: 143 !
along with the log file.

I am also trying to compare two files for any duplicate records in it. I used this command, but its not working. I need this script to compare two file of the same type,, but if any duplicate records in file B, then the user should be intimated by e-mail that the file B contains duplicate records.

The script that i am working is :
Code:
cmp $( wc -l </space/dbexport/PHR/data/eligExport.csv ) to $( sort -u /space/dbexport/PHR/data/eligExport-20101019.csv | wc -l )
( echo "Message: $variables The total number of records in the input file is: $(wc -l </space/dbexport/PHR/data/eligExport.csv ) !" ; u
uencode $logfile $basename ) | mailx -s "$subject" "$to"

Please let me know how to compare two files and send an e-mail to the user if the file B contains any duplicate records in it.

Thanks,
Rahman

Last edited by Scott; 10-26-2010 at 06:07 PM.. Reason: Code tags, please...
 

3 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Linux Multipathing Enhancement

We are searching for DEVICE MAPPER TABLE FORMAT and how to access it through user space?? We are working on enhancement in multipatrhing as 1] scalable path testing 2] event mechanism 3] i/o load sharing. So we need to access device info as well as all paths to that device, devices status,paths... (1 Reply)
Discussion started by: rajaryan99
1 Replies

2. UNIX for Dummies Questions & Answers

Linux Multipath Enhancement

Hi.. when i delete a Lun from a Array on a SAN, and again when i create a Lun it shows that the newly created Lun has the ID of the Old deleted Lun which is leading to data corruption. All this is handled by the Multipath software. can anybody help. (0 Replies)
Discussion started by: Praveen13
0 Replies

3. Shell Programming and Scripting

Pagination need enhancement.

I have below folder structure . |--summit | |----xpnldetails | |----trades | |----svar | | |------checksum | |----xpnl | |----adjustment | | |------summit | | |------ap | |----risks | |----hypopnl | |----fxeffect | |----audittrail |... (0 Replies)
Discussion started by: manas_ranjan
0 Replies
GETMXRR(3)								 1								GETMXRR(3)

getmxrr - Get MX records corresponding to a given Internet host name

SYNOPSIS
bool getmxrr (string $hostname, array &$mxhosts, [array &$weight]) DESCRIPTION
Searches DNS for MX records corresponding to $hostname. PARAMETERS
o $hostname - The Internet host name. o $mxhosts - A list of the MX records found is placed into the array $mxhosts. o $weight - If the $weight array is given, it will be filled with the weight information gathered. RETURN VALUES
Returns TRUE if any records are found; returns FALSE if no records were found or if an error occurred. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | This function is now available on Windows plat- | | | forms. | | | | +--------+---------------------------------------------------+ NOTES
Note This function should not be used for the purposes of address verification. Only the mailexchangers found in DNS are returned, how- ever, according to RFC 2821 when no mail exchangers are listed, $hostname itself should be used as the only mail exchanger with a priority of 0. Note For compatibility with Windows before this was implemented, then try the PEAR class Net_DNS. SEE ALSO
checkdnsrr(3), dns_get_record(3), gethostbyname(3), gethostbynamel(3), gethostbyaddr(3), the named(8) manual page. PHP Documentation Group GETMXRR(3)
All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy