I have two files:
file1 has the format:
field1;field2;field3;field4
(file1 is initially unsorted)
file2 has the format:
sort -k1 uses all fields starting from field 1 as the key. You need to specify a stop field.
sort -k1
sort -t\; -k1,1