This script defines comparison utilities and is included in the J standard library. Definitions are loaded into the jcompare locale with cover functions in z.
C | compare |
F | fcompare, fcompares |
Compare character data.
text1 compare text2
Arguments may be character strings or character matrices with trailing blanks ignored.
Result shows lines not matched, in form:
n [l] text
where:
n = 0=left argument, 1=right argument
[l] = line number
text = text on line
Compare two text files.
opt fcompare files
where:
opt is optional suffix
files is 2 file names or prefixes, given
either as character string cut on blanks
or as 2-element boxed list
fcompare '~mywork/myutil.ijs ~/jbak/mywork/myutil.ijs'
'/myutil.ijs' fcompare jpath '~mywork';'/jbak/mywork'
as fcompare but ignoring different line separators