> It seems that the sed '1s/ > $//;1q' > > is incorrect. But maybe I am wrong with this. You are not wrong. $ p4 changes mktexlsr Change 3206 on 2003/06/23 by rahtz at spqr-dell 'lets dump some more ^Ms ' ... I think that mktexlsr *intentionally* had some ^M characters in it... That cleanup has broken this script. Thomas