My req is i need to get the output if the two columns are not equal below is my code.
The output is as below here my req is for example the first shouldnt be printed as both are equal the second should be printed as both are not equal.
cat testingfull.txt|sed -n '/"Exp_CDL_BOOKINGS_F"/,/TABLEATTRIBUTE NAME/p'|grep EXPRESSION | awk -F"\"" '{print $8,"=",$12}'
BOOK_DATE_KEY=BOOK_DATE_KEY
Lkp_BOOKINGS_FACT_KEY=iif( not isnull(i_BOOKINGS_FACT_KEY) and isnull(iif(BOOK_DATE_KEY<>Lkp_BOOK_DATE_KEY, NULL)),null,i_BOOKINGS_FACT_KEY)
BOOKINGS_FACT_KEY=Lkp_BOOKINGS_FACT_KEY
cmp command in Linux/UNIX is used to compare the two files byte by byte and helps you to find out whether the two files are identical or not.
Compare columns in your awk command:
awk -F'"' '$8!=$12 {print $8,"=",$12}'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With