On Fri, Oct 3, 2008 at 12:11 PM, David A. Case <case.biomaps.rutgers.edu> wrote:
> On Fri, Oct 03, 2008, Gustavo Seabra wrote:
>>
>> Weird... it works just fine for me. What's your 'diff' version? I'm
>> using Cygwin 1.5.25-15, and:
>>
>> $ diff -v
>> diff (GNU diffutils) 2.8.7
>>
>> $ patch -v
>> patch 2.5.8
>
> I have the same versions. And (in spite of Bob's comments) it is quite
> unusual for something like this to fail on cygwin. So there may be something
> about my setup that is inconsistent.
>
> Here is my test, looks like yours(?):
>
> gibbs% echo "abcdef" > test_file
> gibbs% diff -Naur /dev/null test_file > patch1
> gibbs% cat patch1
> --- /dev/null 2006-11-30 19:00:00.000000000 -0500
> +++ test_file 2008-10-03 11:48:59.281250000 -0400
> .. -0,0 +1 ..
> +abcdef
> gibbs% rm test_file
> rm: remove regular file `test_file'? y
> gibbs% patch -N < patch1
> can't find file to patch at input line 3
> Perhaps you should have used the -p or --strip option?
> The text leading up to this was:
> --------------------------
> |--- /dev/null 2006-11-30 19:00:00.000000000 -0500
> |+++ test_file 2008-10-03 11:48:59.281250000 -0400
> --------------------------
> File to patch:
>
>
>
> If I do a "touch test_file" right before patch, so that it is a zero-length
> file, then the patch command works. So, the "can't find file to patch"
> statement is indeed referring to "test_file" and not to "/dev/null".
>
> Note also: if test_file does not exist, and I type "patch testfile < patch1",
> things work.
>
> This may all be clear once I figure it out, but right now it is not so clear.
>
> ...thx..dac
>
>
Hi Dave,
Your test works just fine for me, with the exception that I don't get
asked if I want to remove the test_file, but I don't see any
connection there.
My bash options are:
$ echo $-
himBH
Let me know if there is nay extra information that may help pinpoint this.
Gustavo.
Received on Sun Oct 05 2008 - 05:07:46 PDT