Mateusz Cieciura wrote: > Hello, > > I have been trying to use Patch 2.6.1 on Grml 3.7.9 in order to patch > a Xserver configuration file. > I would like to do it in a shell script: > > #!/bin/sh > #grml-patch-xserverrc > > patch -p0 <<EOF
Change the above to this, and it will work better: patch -p0 <<'EOF' Without the quotes, your script below expands constructs like $@ in the here script. > --- /etc/X11/xinit/xserverrc 2012-06-16 23:54:02.000000000 +0200 > +++ /etc/X11/xinit/xserverrc 2013-03-14 09:53:27.581543109 +0100 > @@ -1,3 +1,4 @@ > #!/bin/sh > > -exec /usr/bin/X -nolisten tcp "$@" > +#notcp="-nolisten tcp" > +exec /usr/bin/X $notcp "$@" > EOF > > Unfortunatelly, I keep getting an error message: > > patching file /etc/X11/xinit/xserverrc > Hunk #1 FAILED at 1. > 1 out of 1 hunk FAILED -- saving rejects to file /etc/X11/xinit/xserverrc.rej ...
