- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need to Compare the two extacts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2011 09:40 AM
11-01-2011 09:40 AM
Need to Compare the two extacts
Hi
I need a shell script or perl script, Basically it needs to accepts two extract paths as inputs and comapre the two ouptputs (apple to apple) , Just we need to ensure that the extracts have the correct format and the content is also matching .
In Comparsion one would be the baseline ( assume to be correct ) and other is new extract generated.. We just to need do some comaprions and give the output saying it is matching or not matching with the difference report..
Note: The file delimeter separted is "|"
Kinldy help me in designing the test script for this
Thanks for your time & highly appreciated
Reddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2011 10:14 AM
11-01-2011 10:14 AM
Re: Need to Compare the two extacts
Have you looked at the 'diff' command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2011 01:47 PM
11-01-2011 01:47 PM
Re: Need to Compare the two extacts
Please can you help me in designing the shell script for this, accepting two paramters ... and checking the File headers and the Data content, if everything is macthing saying... "All the records are amcvthing" or else need to give the the rows where it is not matching
Thanks for your help much appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2011 08:00 PM
11-01-2011 08:00 PM
Re: Need to Compare the two extacts
> Please can you help me [...]
Probably not, unless you can explain exactly what you're trying to
do.
My psychic powers are too weak to tell me what you mean by:
The file delimeter separted is "|"
File headers
Data content
We non-psychics can't see your files, and probably can't guess exactly
what you wish to do with them.
Still a good idea:
man diff
If "diff" does not do what you want, then you might try (again?) to
explain exactly what you do want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2011 08:06 PM
11-01-2011 08:06 PM
Re: Need to Compare the two extracts
>can you help me in designing the shell script for this, accepting two parameters
As Patrick mentioned, look at diff(1).
If these two files are text files, you can do:
#!/usr/bin/sh
# Usage: $0 file1 file2
diff $1 $2
if [ $? -eq 0 ]; then
echo "All the records are matching"
fi
The above scripts assumes the names of the files aren't in the files, which would be a difference to ignore.