Menu

windows diff Utils

Help
2006-06-06
2012-07-26
  • Nobody/Anonymous

    Hi, I am using diff (GNU diffutils) in a windows XP and perl environment. It does not seems that there is an option to this utility that will write the diff results to an output file from the perl program. I am using the "system" call to invoke the diff utility. Thanks in advance if you can help.

    Af

     
    • Keith Marshall

      Keith Marshall - 2006-06-07

      Diff always writes output to stdout. You need to use output redirection, if you want to capture its output in a file. The command line syntax is:

      diff [-options] f1 f2 > outfile

      I don't know perl, so can't say how you do that from within a perl program; perhaps the system function supports that syntax directly, as C's does.

      You can find the diff manpage here:
      http://man.linuxquestions.org/?query=diff&section=0&type=2

      HTH,
      Keith.

       
MongoDB Logo MongoDB