--- Steve Harris <S.W.Harris(a)ecs.soton.ac.uk> wrote: > On Sun, Aug
24, 2003 at 11:03:43 -0700, Mark Knecht wrote:
Presumably
if one file had a few seconds of silence at the
start of
end I could just delete that by hand in vi? I
don't know how far
off in
lines diff can handle looking for a first match,
but a few
seconds could
end up being 100K lines...
I think diff would handle it fine, it doesn't have much choice, but
you would get bored paging through all those zeros.
I guess an easy fix would be to crunch up all the 0.0's so that
instead of
0.0 0.0
0.0 0.0
...
40000 times
you got
0.0 0.0 40000
(run length encoding) so diff would just sho the difference in the
numer, rather than listing all the lines. It would be a trivial
awk script I think, an exercise for the reader :)
- Steve
hi,
you could pipe the diff output to 'uniq -c' command here?... with the
-c parameter it counts the input (see manpage). example:
[12] HOME> cat > uneek1
0
0
0
0
0
0
0
0
0
0
1
2
3
[13] HOME> cat > uneek2
1
2
3
[14] HOME> diff uneek1 uneek2
1,10d0
< 0
< 0
< 0
< 0
< 0
< 0
< 0
< 0
< 0
< 0
[15] HOME> diff uneek1 uneek2 |uniq -c
1 1,10d0
10 < 0
a perfect match (with only a starting silence in one of the files)
should result in only one line of counted zero's in the uniq's
results. i think. =)
gr, ALEX
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger
http://uk.messenger.yahoo.com/