i basically have 2 files and sdiff of the files is given below
sdiff file1 file 2
control_file <
path INDEX <
size 613 <
mode 0444 <
mtime 1349253720 <
tag INDEX <
control_file <
path INFO <
size 1461 <
mode 0444 <
mtime 1349253720 <
tag INFO <
file file
path /opt/wli/bin/wlitool path /opt/wli/bin/wlitool
type f type f
size 2869432 size 2869432
cksum 3407447155 cksum 3407447155
mode 0555 mode 0555
uid 0 uid 0
gid 2 gid 2
owner root owner root
group bin group bin
mtime 1349245905 mtime 1349245905
compression_type gzip compression_type gzip
compression_state compressed compression_state compressed
compression_cksum 108833867 compression_cksum 108833867
compressed_size 1033608 compressed_size 1033608
file file
path /opt/wli/examples path /opt/wli/examples
type d type d
mode 0555 mode 0555
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
file file
path /opt/wli/examples/Makefile path /opt/wli/examples/Makefile
type f type f
size 1448 size 1448
cksum 3256497595 cksum 3256497595
mode 0444 mode 0444
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
mtime 1303277732 mtime 1303277732
compression_type gzip compression_type gzip
compression_state compressed compression_state compressed
compression_cksum 3904222039 compression_cksum 3904222039
compressed_size 602 compressed_size 602
file file
path /opt/wli/examples/README path /opt/wli/examples/README
type f type f
size 2455 size 2455
cksum 2233918146 cksum 2233918146
mode 0444 mode 0444
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
mtime 1303277718 mtime 1303277718
compression_type gzip compression_type gzip
compression_state compressed compression_state compressed
compression_cksum 2362662275 compression_cksum 2362662275
compressed_size 971 compressed_size 971
file file
path /opt/wli/examples/api_flac_test.c path /opt/wli/examples/api_flac_test.c
type f type f
size 1000 size 1000
cksum 2153029248 cksum 2153029248
mode 0444 mode 0444
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
mtime 1303277716 mtime 1303277716
compression_type gzip compression_type gzip
compression_state compressed compression_state compressed
compression_cksum 707411327 compression_cksum 707411327
compressed_size 554 compressed_size 554
file file
path /opt/wli/examples/api_ibac_test.cpath /opt/wli/examples/api_ibac_test.c
type f type f
size 1120 size 1120
cksum 3601281228 cksum 3601281228
mode 0444 mode 0444
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
mtime 1303277713 mtime 1303277713
compression_type gzip compression_type gzip
compression_state compressed compression_state compressed
compression_cksum 3423279039 compression_cksum 3423279039
compressed_size 577 compressed_size 577
file file
path /opt/wli/include path /opt/wli/include
type d type d
mode 0555 mode 0555
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
file file
path /opt/wli/include/api.h path /opt/wli/include/api.h
type f type f
size 1872 size 1872
cksum 3504961863 cksum 3504961863
mode 0444 mode 0444
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
mtime 1303217807 mtime 303217807
compression_type gzip compression_type gzip
compression_state compressed compression_state compressed
compression_cksum 870673336 compression_cksum 870673336
compressed_size 795 compressed_size 795
file file
path /opt/wli/lib path /opt/wli/lib
type d type d
mode 0555 mode 0555
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
file file
path /opt/wli/lib/libwliapi.so path /opt/wli/lib/libwliapi.so
type s type s
size 0 size 0
mode 0555 mode 0555
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
link_source libwliapi.so.1 link_source libwliapi.so.1
file file
path /opt/wli/lib/libwliapi.so.1 path /opt/wli/lib/libwliapi.so.1
type f type f
size 221168 size 221168
cksum 4025653529 cksum 4025653529
mode 0555 mode 0555
uid 2 uid 2
gid 2 gid 2
owner bin owner bin
group bin group bin
mtime 1349245751 mtime 349245751
compression_type gzip compression_type gzip
compression_state compressed compression_state compressed
compression_cksum 98047186 compression_cksum 98047186
compressed_size 70051 compressed_size 70051
the only difference between the files expected is additions at the begining of the file, any existing content of the file asfter the new additions can only have changes to mtime, there might be case where in there are no additions to the file1 and only changes can be mtime..... can any one please help in writing a script for find out if there are any other change other than additions in the begining and mtime changes to the existing file ?
i am doing a diff of both the files
1,12d0
< control_file
< path INDEX
< size 613
< mode 0444
< mtime 1349253720
< tag INDEX
< control_file
< path INFO
< size 1461
< mode 0444
< mtime 1349253720
< tag INFO
114c102
< mtime 1303217807
---
> mtime 303217807
147c135
< mtime 1349245751
---
> mtime 349245751
.......can something be done using this diff output ?