ok, i take it back -- i *am* still confused by patch -force
Christopher K. Johnson
ckjohnson at gwi.net
Sat Nov 15 21:50:06 UTC 2003
Robert P. J. Day wrote:
> ok, i finally narrowed down what my issue with patch was. let's say
>that i have the absolute name of a patch file, $PATCH, and the absolute
>name of a directory, $DIR, in which that patch should be applied (with
>-p1, it turns out). what will work nicely is:
>
> $ patch -d $DIR -p1 < $PATCH
>
>what will *not* work is:
>
> $ patch -d $DIR -force -p1 < $PATCH
>
>now, before you all point out the obvious typo (it should be either
>"-f" or "--force", not "-force"), what happens is that *no* warning
>is given, and patch appears to run normally, assuring me that, yes,
>files are all being patched properly, when in fact, nothing of the sort
>is happening.
>
> argh.
>
>rday
>
>
>--
>fedora-list mailing list
>fedora-list at redhat.com
>http://www.redhat.com/mailman/listinfo/fedora-list
>
>
>
>
Single character options can be stacked.
So just as one can do
ls -l -r
or
ls -lr
one can combine the "patch -f -o" as "patch -fo".
And if you look you will find there is a newly created file named "rce"
which contains the patched output. That is because the -o option takes
a following token as the output file, so "patch -force" is the same as
"patch -f -o rce"
There was no error because you specified valid, albeit undesirable, options.
--
-----------------------------------------------------------
"Spend less! Do more! Go Open Source..." -- Dirigo.net
Chris Johnson, RHCE #807000448202021
More information about the fedora-list
mailing list