10 More Discussions You Might Find Interesting
1. AIX
I need to compare two files and find the mismatch columns in it for csv and fixed
width file.
Eg:
file1
c1,c2,c3,c4<----columnname
1,a,4,d
2,b,5,e
3,c,6,f
file2
c1,c2,c3,c4<----columnname
3,x,7,f
2,y,8,e
1,z,9,d
output
c2,c3<---- mismatch columname
a,4 x,7
b,5 or y,8 Ok with... (3 Replies)
Discussion started by: sabzR
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am planning to automate the comparison of data between few tables in 2 different databases ( Teradata and sql server).
Below is the approach which I think of. Please suggest any improvements/Modification :
1) The sql server file is having more records and I have to eliminate the... (5 Replies)
Discussion started by: Rahul Raj
5 Replies
3. Shell Programming and Scripting
Hello,
I am facing issue in summing up a column in unix.I am displaying a column sum up to 4 decimal places and below is the code snippet
sed '1d' abc.csv | cut -d',' -f7 | awk '{s+=$1}END{ printf("%.4f\n",s)}'
-170552450514.8603
example of data values in the column(not... (3 Replies)
Discussion started by: karthik adiga
3 Replies
4. Shell Programming and Scripting
I have 2 files namely branch.txt file & RXD.txt file as below
Ex:Branch.txt
=========================
B1,Branchname1,city,country
B2,Branchname2,city,country
B3,Branchname3,city,country
B4,Branchname4,city,country
B5,Branchname5,city,country
RXD file : will... (11 Replies)
Discussion started by: satece
11 Replies
5. Shell Programming and Scripting
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Discussion started by: ady_koolz
2 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement like below.
client is sending the .txt filles.In that file we have 10 records but when I execute the below command it is showing 9 records.
klena20> wc -l sample_file.txt|awk '{print $1}'
It is showing the output as 9
But in a file records are 10. I found... (7 Replies)
Discussion started by: kirankumar
7 Replies
7. UNIX for Dummies Questions & Answers
Hi
I have used the below steps and found some discrepancies
step 1 :
find ./ -type f -mtime +7 -name "*.00*" | wc -l = 13519 ( total files )
( the size of this files is appx : 10GB )
step 2:
find ./ -type f -mtime +7 -name "*.00*" | xargs tar zcvf Archieve_7.tar.gz
step... (7 Replies)
Discussion started by: rakeshkumar
7 Replies
8. Shell Programming and Scripting
Hi
I have two files f1 and f2 and comma separated file.
I need to comapre two files by field by field and not by whole line.
If they match then skip the line from both the files. If they don't match
write the mismatch record from f1 to f3.
Assume both the files are sorted on first field.
... (5 Replies)
Discussion started by: dgmm
5 Replies
9. Shell Programming and Scripting
Using unix shell script, how to compare two files and print lines with mismatch? Below are the requirements:
1. The number of lines on the two files is not the same.
2. The difference/mismatch can be found on the second or third column.
3. The comparison is not between line 1 of file 1 and line... (16 Replies)
Discussion started by: kingpeejay
16 Replies
10. Shell Programming and Scripting
hi i have two files and i want to compare both the files and find out mismatch in 3rd file
file1
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|1|2
43236|1|0|1|1|0|0|0|1|2
41404|1|0|1|1|0|0|0|1|2
79968|1|0|1|1|0|0|0|1|2
file2
00354|1|0|1|1|0|0|0|1|2
52424|1|0|1|1|0|0|0|0|2... (9 Replies)
Discussion started by: dodasajan
9 Replies