I'm attempting to recursively compare two directories that are structurally equivalent (XML documents in a decompressed excel file), and if any files differ, then overwrite the text from the first file with the text from the corresponding file in the second directory. In the Unix command line, you can easily output a script that will do this for two files using:
diff -e file1.xml file2.xml > edscript.txt
I can then invoke the script with:
echo "w" >> edscript.txt
ed - file1.txt < edscript.txt
However, I'm using Git Bash Windows 7, and there is no "ed" program installed. Is there an equivalent that can output a script and execute? If not, is there a way to install ed on git bash? I've already tried sudo apt-get install ed but the commands don't seem to be possible. My ultimate goal is to run this scripts using python with the subprocess library
Any advice or suggestions are welcome. Thanks!