Comparison function that compares two text files in Unix

前端 未结 5 2068
走了就别回头了
走了就别回头了 2021-02-07 12:54

I was wondering if anyone could tell me if there is a function available in unix, bash that compares all of the lines of the files. If they are different it should output true/f

5条回答
  •  情话喂你
    2021-02-07 13:31

    echo "read first file" read f1 echo "read second file" read f2

    diff -s f1 f2 # prints if both files are identical

提交回复
热议问题