Ae Brasileiro,
Essa opção é o seguinte:
Ela vai mostrar a linha que difere entre os dois arquivos + n linhas que
seguem após ela.
Ex.:
arquivo teste.txt
linha 1
linha 2
linha 3
linha 4
linha 5
arquivo teste1.txt
linha T
linha 2
linha 3
linha 4
linha 5
diff -C 1 teste.txt teste1.txt
*** teste.txt 2009-03-19 12:44:50.000000000 -0300
--- teste1.txt 2009-03-19 12:45:13.000000000 -0300
***************
*** 1,2 ****
! linha 1
linha 2
--- 1,2 ----
! linha T
linha 2
diff -C 3 teste.txt teste1.txt
*** teste.txt 2009-03-19 12:44:50.000000000 -0300
--- teste1.txt 2009-03-19 12:45:13.000000000 -0300
***************
*** 1,4 ****
! linha 1
linha 2
linha 3
linha 4
--- 1,4 ----
! linha T
linha 2
linha 3
linha 4
======================================
CyberCrow
Conhecimento é Poder !
Quando voce perde a mente limitada
Voce liberta a sua vida
======================================
1. Try to find an answer by searching the archives of the forum you plan to
post to.
2. Try to find an answer by searching the Web.
3. Try to find an answer by reading the manual.
4. Try to find an answer by reading a FAQ.
5. Try to find an answer by inspection or experimentation.
6. Try to find an answer by asking a skilled friend.
7. If you're a programmer, try to find an answer by reading the source code.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/L/U d- s-: a- C++ LSU++++ P+ L+++ E--- W++ N w--
O-- M- V- PS PE- Y PGP++ t 5 X++ R tv- b++ DI D+
G++ e- h* r y+
-------END GEEK CODE BLOCK------
Wagner Brasileiro wrote:
> Bom dia pessoal,
>
> Como funciona o comando diff e a amioria das suas opções eu
> compreendo, mas há uma opção -C (context), que no "man" diz que o
> default para para que o "patch" funcione corretamente é 2, se eu usar
> o diff com a opção "-C 0" (diff -C 0) ele se comporta aparentemente
> normal, já se usar a tal opção-C 2 ou outro número inteiro qualquer,
> os resultados se tornam incompreensíveis. Alguém saberia me explicar
> que doideira ele apronta com essa opção e exatamente para que ela serve!?
>
> Obrigado a todos e um bom dia,
>
> Wagner Brasileiro
>
> >
--~--~---------~--~----~------------~-------~--~----~
GUS-BR - Grupo de Usuários de Slackware Brasil
http://www.slackwarebrasil.org/
http://groups.google.com/group/slack-users-br
Conheça o Novo Forum do GUS-BR na Under-Linux.Org em:
http://under-linux.org/forums/slackware/
-~----------~----~----~----~------~----~------~--~---