Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trouble with a DOS command

1 view
Skip to first unread message

Mok-Kong Shen

unread,
Sep 7, 2008, 6:00:16 AM9/7/08
to

Hello,

I created with EDIT file1, copied it to file2, deleted the
first character of second line of file2 and gave the command:

fc /L /N file1 file2 > file3

and got the following result in file3:

***** file1
1: abline1
2: abline2
3: abline3
***** FILE2
1: abline1
2: bline2
3: abline3
*****

What's wrong with my command? Why didn't fc list only the
difference, namely line 2? I am confused. Please kindly help.

(I have XP. From internet I learned of a recent hotfix for XP for
the fc command. I have installed that hotfix.)

Mok-Kong


MasterBlaster

unread,
Sep 7, 2008, 1:40:49 PM9/7/08
to

"Mok-Kong Shen" wrote

http://www.vfrazee.com/ms-dos/6.22/help/fc.htm

- /L Compares the files in ASCII mode. FC compares the two files line by line
- and attempts to resynchronize the files after finding a mismatch.

FC is showing you the last line that was still "synchronized", then all the lines it
found to be different, then the line where the files became "re-synchronized".

If you make your two files longer, like 50 lines, and change only line 21, you will get:

> ***** file1
> 20: abline20
> 21: abline21
> 22: abline22
> ***** FILE2
> 20: abline20
> 21: bline21
> 22: abline22
> *****


The parameter /N makes it easier to locate the offending lines in ASCII files, bit
if you're comparing non-ASCII, or forget to include /N, it would be much harder to
figure out where in a 50,000 line file something went wrong, particularly if one file
has both altered lines, and missing lines.


0 new messages