I am trying to revert a file from a previous version of the same file, using diff and patch
diff_out=$(diff -u $name $chVer/$name.latest) patch -u $name $diff_out Where $name is the file name i want to revert, $chVer is the folder of all the older versions of the file
Unfortunately this doesn't work
patch: unrecognized option '---' patch: Try 'patch --help' for more information. the $diff_out content is not read by the patch command as a file, thus do i need the output the content of the diff to a temporary file that i read with patch ? I wanted not to do that, because i will delete that file as soon as the patch is done
cat $chVer/$name.latest > $name