Advertisement
szabozoltan69

patch

Oct 29th, 2012
216
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. A:
  2. 111
  3. 222
  4. 222
  5. 55555
  6. 66666
  7.  
  8. B:
  9. 111
  10. 222
  11. 222MM
  12. 55555
  13. 66666
  14. 8888888
  15.  
  16. patchfile:
  17. *** A
  18. --- B
  19. ***************
  20. *** 1,5 ****
  21. 111
  22. 222
  23. ! 222
  24. 55555
  25. 66666
  26. --- 1,6 ----
  27. 111
  28. 222
  29. ! 222MM
  30. 55555
  31. 66666
  32. + 8888888
  33.  
  34. What to do?
  35. patch -p0 < patchfile #changes A
  36.  
  37. Solution:
  38. --- /dev/null
  39. +++ ./B
  40.  
  41. cp A B
  42. patch -p1 < patchfile
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement