cancel
Showing results for 
Search instead for 
Did you mean: 

sdiff help - sorting output

SOLVED
Go to solution
lawrenzo_1
Super Advisor

sdiff help - sorting output

Hi all,

I am running sdiff against a list of files and would like to put the search in a loop:

file1:

bl_equ.ini
bl_expauth.ini
bl_exp.ini
bl_multi_cal1.ini
bl_multi_cal2.ini
bl_multi_cal3.ini
blXML42.ini
blXML50.ini
callcredit42_request.xld
callcredit42_response.xld
callcredit42.xld
callcredit50_request.xld*
callcredit50_response.xld*
callcredit50.xld*
callcredit63MultiLogin_request.xld
callcredit63MultiLogin_response.xld
callcredit63MultiLogin.xld
callcredit63_request.xld
callcredit63_response.xld
callcredit63.xld
equifaxXml_request.xld*
equifaxXml_response.xld*
equifaxXml.xld*
experianauth.cfg
experian.cfg


file2:

bl_ts01_equ.ini
bl_ts01_exp.ini
bl_ts01_expuath.ini
bl_ts01_multi_cal1.ini
bl_ts01_multi_cal2.ini
bl_ts01_multi_cal3.ini
bl_ts03_equ.ini
bl_ts03_exp.ini
bl_ts03_expuath.ini
bl_ts03_multi_cal1.ini
bl_ts03_multi_cal2.ini
bl_ts03_multi_cal3.ini
blXML42.ini
blXML50.ini
callcredit42_request.xld
callcredit42_response.xld
callcredit42.xld
callcredit50_request.xld*
callcredit50_response.xld*
callcredit50.xld*
callcredit63MultiLogin_request.xld
callcredit63MultiLogin_response.xld
callcredit63MultiLogin.xld
callcredit63_request.xld
callcredit63_response.xld
callcredit63.xld
clfiletest.tar
equifaxXml_request.xld*
equifaxXml_response.xld*
equifaxXml.xld*
experianauth.cfg
experian.cfg


how can I script to sdiff the files listed in each file?

any help is greatly appreciated.

Thanks

Chris
hello
5 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: sdiff help - sorting output

Hi Chris:

The number of files represented in list-1 and list-2 are unequal. Why?

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor
Solution

Re: sdiff help - sorting output

Hi Chris:

Anyway, if the file lists are equal in number, you could do:

# paste list1 list2|while read X Y;do sdiff ${X} ${Y};done

Regards!

...JRF...
kobylka
Valued Contributor

Re: sdiff help - sorting output

Hello Chris!


Number of lines must equal in both files:

%paste file1 file2 | awk '{system("sdiff "$1" "$2)}'


Kind regards,

Kobylka
lawrenzo_1
Super Advisor

Re: sdiff help - sorting output

Thanks both .....

Number of files are different because I didnt paste the whole contents of the file - doh!

My bad mistake

I'll take a look at your commands guys - Thanks
hello
lawrenzo_1
Super Advisor

Re: sdiff help - sorting output

thanks you both ....

I have never come across the paste command so that appears to be the solution.

Chris
hello