documentos:bash:diff_patch

diff

$ cat ejemplo1.txt

John Smith 	1001 	Sr. Engineer
Peter		1002	Engineer
Fernandous	1003	Sr. Engineer
Kraml		1004	Jr. Engineer

$ cat ejemplo2.txt

John Smith 	1001 	Sr. Engineer
Peter		1002	Engineer
Fernandous	1003	Resigned
Kraml		1004	Jr. Engineer
Raj		1005	Engineer
  • diff
  • colordiff
  • wdiff
  • dwdiff
  • meld

patch

$ diff -u ejemplo1.txt ejemplo2.txt > ejemplo.patch
$ patch < ejemplo.patch 
$ diff -u ejemplo1.txt ejemplo2.txt
$ patch -R < ejemplo.patch
$ diff -u ejemplo1.txt ejemplo2.txt
  • documentos/bash/diff_patch.txt
  • Última modificación: 2016/04/25 23:22
  • por 127.0.0.1