Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!vixen.cso.uiuc.edu!abruzzi.physics.uiuc.edu!ksorn From: ksorn@abruzzi.physics.uiuc.edu (Keith Sorn) Newsgroups: comp.unix.bsd Subject: Help,using cmp to detect differences in files Date: 8 Sep 1993 20:25:16 GMT Organization: University of Illinois at Urbana Lines: 24 Distribution: world Message-ID: <26lf3c$ek@vixen.cso.uiuc.edu> NNTP-Posting-Host: abruzzi.physics.uiuc.edu Keywords: Help,cmp,exit code, if Hello I would like to use the function cmp to test weather two files of the same name in different directories are idenical or not. I would like to do this in a script. If you can help please EMAIL me at ksorn@roma.physics.uiuc.edu. I envision something like this: # If ( cmp -s file1 file2 .eq. 0 ) then write(*,*) "files not identical" else write(*,*) "filesidentical" endif Yes, I know I am a fortrash hack! But that is why there are bright helpful people like you around. Thank You in advance Keith