The syntax is line number[, line number end]command [text]
where command is one one of a, c, d
. marks the end of the ed command stream
Count the number of d commands - deletes
Count the number of a commands - inserts
Count the number of c commands - changes
When there is a line range eg., 13,17a subtract 17 - 13 to get the number of lines
Thanks jim mcnamara for the help. I am new to unix. My actuall requirement is:
I have two versions of directories OLD and LATEST. I need to compare the files in both the versions and list the files that differ in both the veresions. Also i need to list the differences in the number of lines in each different files from the two versions.
Ex:
OLD has files a.txt, b.txt
LATEST has a.txt, b.txt
After Comparison a.txt is similar in both OLD and LATEST. b.txt is modified in LATEST so when diff is done, it is compared and the output should result in the number of lines as discussed above.