Comm giving unexpected results


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Comm giving unexpected results
# 1  
Old 12-10-2013
Comm giving unexpected results

Hi
I am comparing two files with comm -13 < (sort acc11.txt) < (sort acc12.txt) > output.txt
purpose: Get non matching records which are in acc12 but not in acc11...
TI am getting WRONG output.

Is there any constraints with record length with comm? The above files are the two consective
dumps of tables ( have clob data) of two different day.
# 2  
Old 12-10-2013
Quote:
Originally Posted by vedanta
Hi
I am comparing two files with comm -13 < (sort acc11.txt) < (sort acc12.txt) > output.txt
purpose: Get non matching records which are in acc12 but not in acc11...
TI am getting WRONG output.

Is there any constraints with record length with comm? The above files are the two consective
dumps of tables ( have clob data) of two different day.
Show your input and expected output.
# 3  
Old 12-10-2013
Quote:
Originally Posted by vedanta
comm -13 < (sort acc11.txt) < (sort acc12.txt) > output.txt
See if this helps (From the man pages of comm):
Code:
The following options shall be supported:
    -1     Suppress the output column of lines unique to file1.
    -2     Suppress the output column of lines unique to file2.
    -3     Suppress the output column of lines duplicated in file1 and file2.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Seeing unexpected results when i run through cronjob

Hi I'm having hard time here with below script. If i run script manually i see expected results but, if i keep this script in cron job i'm getting unexpected results. Unexpected results means even though condition is true,cronjob returning output of else condition. This script and cronjob... (2 Replies)
Discussion started by: buzzme
2 Replies

2. Shell Programming and Scripting

Perl giving unexpected md5 hash values

I am trying to speed up creating a line by line hash file from a huge file using Perl. Here is my current (working but too slow) Bash code: (while read line; do hash=$(echo -n $line | md5sum); echo ${hash:0:32}; done)And here is my Perl code: perl -MDigest::MD5 -le 'foreach $line ( <STDIN> )... (3 Replies)
Discussion started by: Michael Stora
3 Replies

3. UNIX for Dummies Questions & Answers

Grep not giving expected results

Version: RHEL 5.8 I am doing a grep of the piped output from ps command as shown below. I am grepping for the pattern ora_dbw* . But, in the result set I am seeing strings with ora_dbr* as well like ora_dbrm_SDLM1DAS3 as shown below. Any idea why is this happening ? $ ps -ef | grep... (6 Replies)
Discussion started by: John K
6 Replies

4. Shell Programming and Scripting

Sed in vi - \r and \n not giving desired results

I use many different machines at work, each with different versions of o/s's and installed applications. Sed in vi is particularly inconvenient in the sense that sometimes it will accept the "\r" as a carriage return, sometimes not. Same thing with "\n". For instance, if I have a list of hosts... (7 Replies)
Discussion started by: MaindotC
7 Replies

5. HP-UX

find -mtime giving strage results in HP-UX

Hi, I am using HP-UX B.11.23 U ia64 I am trying to retrieve files using -mtime option of find command However I found that -mtime is not giving correct results Following is the output of commands executed on 03-Dec-2009 It can be seen that -mtime +1 should have returned all... (2 Replies)
Discussion started by: Chetanaz
2 Replies

6. Shell Programming and Scripting

awk script giving unstable results

Hi all Here I came accross a situation which i am unable to reason out... snippet 1 psg ServTest | grep -v "grep" | grep -v "vi" | awk '{ pgm_name=$8 cmd_name="ServTest" gsub(/]*/,"",pgm_name) if(pgm_name==cmd_name) { print "ServTest Present =" cmd_name} }'... (10 Replies)
Discussion started by: Anteus
10 Replies

7. Shell Programming and Scripting

Unexpected Results (at least I did not expect them)

I have two sripts running in bash. The first one uncompresses log files and moves them to a working directory using uncompress -c and > output to new directory. It then creates one control record to assure our search returns a record. It then calls or executes the second script, which is a grep for... (6 Replies)
Discussion started by: altamaha
6 Replies

8. UNIX for Dummies Questions & Answers

Unexpected Results

Hello, When I run this script, here's what I get: Searching ... found 1111 2222 3333 ..... 7777 ..... 8888 9999 in 95_test Search completed. I expected only to see what number was found in the file, not including the ones not found. Thanks for your help! #!/bin/sh (1 Reply)
Discussion started by: SSims
1 Replies

9. Shell Programming and Scripting

egrep not giving desired results

I have written a shell script which looks like below: grep -v ',0,' ./DATA/abc.001 > ./DATA/abc.mid egrep $GREPSEARCH ./DATA/ebc.mid > ./DATA/abc.cut the variable GREPSEARCH has values like the below: ... (3 Replies)
Discussion started by: igandu
3 Replies

10. Shell Programming and Scripting

Script giving wrong results....

hi, I have this script which gives me the result... #! /usr/bin/sh set -x cd /home/managar a=1 while true do if then echo " File log.txt exists in this directory " exit 0 fi echo " File has not arrived yes..." sleep 3 let a=a+1 if then (1 Reply)
Discussion started by: mgirinath
1 Replies
Login or Register to Ask a Question