You can use diff -n or –rcs options to output an RCS format diff used by RCS programs. This is similar to diff -f except that each command specifies the number of lines affected.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
## Display the difference in Revision Control System (RCS) format. echo -e "1\n2\n3\n4" > myfile1 ## create some files echo -e "1\n2\n3\n4\n5" > myfile2 diff -n myfile1 myfile2 ## display the difference in RCS format ## returns ## a4 1 ## 5 diff myfile1 myfile2 ## display the difference in notmal format ## returns ## 4a5 ## > 5 |