Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ã³ã¼ããæ¸ãã¦ããã¨ã以åã®ã³ã¼ãã¨ç¾å¨ã®ã³ã¼ãã¨ã®diffãåããããã¨ãããããã¾ãã ã§ããdiffã®çµæã¯ã¡ãã£ã¨èªã¿ã«ãããããdiffã®çµæãè²ä»ãããã¦ãããããã£ã¨èªã¿ããããããªããã¨ãä»æ¥ãµã¨æãã¾ããã ããã§ãzshã®ã°ãã¼ãã«ã¨ã¤ãªã¢ã¹ã使ã£ã¦ãdiffã®çµæãvimã§è²ä»ããã¦è¡¨ç¤ºããããã«ãã¦ã¿ã¾ããã(.vimrcã«ã¯ãsyntax onãã¨æ¸ãã¦ããã¾ãã) % vim ~/.zshrc [...] # View command results(stdout) by vim export VIM_TMP=/tmp/vim.tmp alias -g V="> $VIM_TMP$$; vim $VIM_TMP$$"ä»çµã¿ã¯ç°¡åã§ãä¸æãã¡ã¤ã«ã«ã³ãã³ãã®å®è¡çµæãä¿åãã¦ãvimã§ãã®ä¸æãã¡ã¤ã«ãéãã¦ããã ãã§ããä¸æãã¡ã¤ã«ãä½ã£ã¦ããæããã¡ãã£ã¨ããµ
Copyright (c) 2001 Koichi OKADA ã¾ããåæ±èª¬ææ¸ãããèªã¿ãã ããã ã¯ããã« diff/patch ã¨ã¯ diff ã¨ããã®ã¯ãã¡ã¤ã«ã®å·®åãä½æãããã¼ã«ã patch ã¨ããã®ã¯ãã¡ã¤ã«ã®å·®åãããã¡ã¤ã«ã®å¤æ´ãåç¾ãããã¼ã«ã§ãã é常 diff ã§ä½ã£ãå·®åãã¡ã¤ã«ãããã(ã°ããããã)ã¨å¼ã³ã¾ãã ã©ã¤ã»ã³ã¹ å¤åãæ°ã«ããªãã¦è¯ãã§ãã æºå UNIX ã®å ´å é常 UNIX ã«ã¯ diff 㨠patch ã¯æ¨æºã§å ¥ã£ã¦ãã¾ãã ç¹ã«æºåã¯ãããªãã¯ãã§ãã Windows ã®å ´å ä¸çªæã£åãæ©ãã®ã¯cygwinãå ¥ãããã¨ã§ãã cygwin ã¯ã§ãéããã¨ã cygwin ã¯ã¡ãã£ã¨ã£ã¦è¨ã人㯠vector辺ã㧠win32 native 㪠rcs/diff 㨠patch ã åã£ã¦æ¥ã
ã¨ããã¨èªåçã«ãããå½ã¦ä½æ¥ãè¡ãããããªãªã¸ãã«ã®ãã¡ã¤ã«ã¯ã.orig ã¨ããæ¡å¼µåãä»ãããã¡ã¤ã«ã«ä¿åãããããã ããpatch ã«æ £ãã¦ããªãå ´åã¯ãã«ã¬ã³ããã£ã¬ã¯ããªãã©ãã«ãããã«è¿·ãã§ããããã«ã¬ã³ããã£ã¬ã¯ããªãéãã¨ãããå½ã¦ã«å¤±æããããã§ããã
æçµæ´æ° 2018-03-09 UNIX/Linux ã«ããã diff ã³ãã³ãã¯ã2ã¤ã®ããã¹ããã¡ã¤ã«ã®éã (å·®å) ã表示ããã³ãã³ãã§ããããã¡ã¤ã«å 容ãä¸è´ãã¦ãããã®ç¢ºèªãå¯è½ããã£ã¬ã¯ããªãå帰çã«ãã©ããè¤æ°ã®ãã¡ã¤ã«ãä¸æ¬ãã¦å·®å表示ãããã¨ãã§ããã
patch ãæåã«ä½ã£ãã®ã¯ï¼å¾ã« Perl ãéçºããï¼ã©ãªã¼ã»ã¦ã©ã¼ã«ã§ãããå½¼ã¯ããã1985å¹´5æã«mod.sources ã¸ãã¹ãããï¼å¾ã« comp.sources.unix ã¨ãªã£ãï¼ããã®ããã°ã©ã ã¯GNUããã¸ã§ã¯ãã®ä¸é¨ã¨ãªããããªã¼ã½ããã¦ã§ã¢è²¡å£ãä¿å®ãã¦ããã patchã¯ããã°ã©ãã®éã§ã®ããåãã®ããã«ä½ãããã½ã¼ã¹ã³ã¼ãã®æ´æ°ã®ããã«ããç¨ãããã¦ããããã®ããããããã½ããã¨è¨ãã°ããã°ã©ã ã«ä½¿ããã®ã¨ããå å ¥è¦³ããã人ãå¤ãããå®éã«ã¯ããããããã¹ãã«é©ç¨å¯è½ã§ããããããã½ããã¯ãå½ã¦å¸ãã¨ããæ¬æ¥ã®èªç¾©ã«åãã¦ãããã¹ãã®è¿½å ã®ã¿ã§ãªãåé¤ãè¡ããã¨ãã§ããããªãpatchã¯ããã¤ããªå½¢å¼ã®ããããæ±ãããã°ã©ã ã§ã¯ãªãã patch ã¸ã®å ¥åã¨ãªã diff ãã¡ã¤ã«ã¯èªã¿åãå¯è½ãªããã¹ããã¡ã¤ã«ã§ããã使ãåã«äººéãä¸èº«ã確ããããã¨ã容æ
ãã®é ç®ã§ã¯ã2ã¤ã®ãã¡ã¤ã«ãæ¯ã¹ã表示ããã°ã©ã ã«ã¤ãã¦èª¬æãã¦ãã¾ããã³ãã¥ããã£ã®ããã°ã«ã¤ãã¦ã¯ãm:Diff (blog)ããã覧ãã ããã diffï¼ãã£ãï¼ã¯ããã¡ã¤ã«ã®æ¯è¼ãè¡ãããã®ã³ãã³ãã§2ã¤ã®ãã¡ã¤ã«éã®éããåºåã§ããããã°ã©ã ãdiffããã°ã©ã ã¯è¡åä½ã§ããã¹ããã¡ã¤ã«éã®å·®ç°ã表示ãããæè¿ã®å®è£ ã§ã¯ãã¤ããªãã¡ã¤ã«ããµãã¼ããã¦ãããããã°ã©ã ããã®åºåããdiffãï¼ãã£ãï¼ã¨å¼ã°ãããåºåããã®ã¾ã¾patchããã°ã©ã ã§é©ç¨ã§ããããããpatchãï¼ãããï¼ã¨ã®å¼ç§°ãä¸è¬çã§ãããã¾ããdiffã³ãã³ã以å¤ããã®åºåã§ãã£ã¦ãå·®å表示ããã°ã©ã ã®åºåã¯diffã¨å¼ã°ãããã¨ãããã"grep"ãæååæ¢ç´¢ãã®ãã®ã®ä»£åè©ã«ãªã£ã¦ããããã«ã"diff"ã¨ããèªãå·®åæ¤åºä¸è¬ãæãã¸ã£ã¼ã´ã³ã¨ãªã£ã¦ããã diffããã°ã©ã ã¯1970年代åé ã«ããã¥ã¼
ãã®ãã¼ã¸ã¯Meadow (Emacs) ã®ç´¹ä»ãã¼ã¸ã§ã ãã®Webãã¼ã¸ã®åææ¸ã¯èªç±ã«ãªã³ã¯ã»è¤è£½ã»åé å¸ã»æ¹å¤ãã¦ããã ãã¦æ§ãã¾ããï¼ ãã ãï¼è¤è£½ã»åé å¸ã»æ¹å¤ã®å ´å㯠Meadow Memo ã®URLãè¨è¼ãã¦ããã¦ä¸ããï¼ Medow memoã¸ã®ãªã³ã¯ã«ã¤ãã¦ï¼ ãã¼ã¸å¥ã«ã¦ã³ã¿ Since 2002/12/13
diffã¯ããã°ã©ãä¸ã¤éå ·ã®ã²ã¨ã¤ã¨ãããããã使ããã§ãããdiffã®åºåã«ã¤ãã¦ã¯å¤§ä½ã®èªã¿æ¹ã¯ç解ãã¦ãããã®ã®ãç´°ããªã¨ããã¾ã§ã¯ç解ã§ãã¦ãã¾ããã§ããã ãªãã§ãdiffã®çæããå·®ååºåããªãªã¸ãã«ãã¡ã¤ã«ã«é©å¿ãããããã¾ãããã°ã©ãä¸ã¤éå ·*1ã¨ãããããªpatchãåå¼·ãã¦ãå®è£ ãã¦ã¿ã¾ããã ã¾ããdiffã®å½¢å¼ã§ãããä¸è¬çãªunified diffã対象ã«ãã¾ããä¾ãã°ã以ä¸ã®ãããªãã®ã§ãã --- hello1.pl 2007-10-12 04:51:39.000000000 +0900 +++ hello2.pl 2007-10-12 04:52:11.000000000 +0900 @@ -1,5 +1,5 @@ #!/usr/bin/env perl -#hello1.pl +#hello2.pl use strict; use warnings; @
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}