16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

patch<br />

same file, patch only creates file orig. When you also specify –o outfile,<br />

patch does not create file-.orig, but if outfile already exists, it creates<br />

outfile.orig.<br />

–c Interprets the patchfile as a context diff file (the output of diff when –c or<br />

–C is specified). You cannot use this option with –e or –n.<br />

–D symbol<br />

Marks changes with the C preprocessor construct:<br />

#ifdef symbol<br />

...<br />

#endif<br />

When you compile the resulting (patched) file, you get the original file if<br />

symbol is not defined, and the changed file if symbol is defined.<br />

–d dir Changes the current directory to dir before processing the patch.<br />

–e Interprets the patchfile as an ed script (the output of diff when –e is<br />

specified). You cannot use this option with –c or –n.<br />

–F n Specifies the number of lines of a context diff to ignore when searching for<br />

a place to install a patch.<br />

–f Forces processing without requesting additional information from the user.<br />

–i patchfile<br />

Reads the patchfile information from the file patchfile . If you do not specify<br />

patchfile, patch reads the information from the standard input.<br />

–l Matches any sequences of blanks in the patchfile to any sequence of<br />

blanks in the input file. In other words, patch considers two lines equivalent<br />

if the only difference between the two is their spacing.<br />

–N Ignores any patches that have already been applied. By default, patch<br />

rejects already-applied patches.<br />

–n Interprets the patchfile as normal diff output. You cannot use this option<br />

with –c or –e.<br />

–o outfile<br />

Writes patched output to outfile instead of to the original file. When you<br />

specify more than one patch to a single file, patch applies the patches to<br />

intermediate versions of the file created by previous patches, resulting in<br />

multiple, concatenated versions of the file being written to outfile.<br />

–p n Deletes n components from the beginning of all pathnames found in the<br />

patch file. If a pathname is an absolute pathname (that is, starts with a<br />

slash), patch treats the leading slash as the first component of the path,<br />

and patch –p 1 deletes the leading slash. Specifying –p 0 tells patch to<br />

use the full pathnames given in the patchfile. If you do not specify this<br />

option, patch only uses the basename (the final path component).<br />

–R Reverses the sense of the patch script. In other words, patch behaves as if<br />

the patch script shows the changes that make the new version into the old<br />

version. You cannot use –R if the patchfile is in ed script format.<br />

470 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference<br />

With –R, patch attempts to reverse each change recorded in the script<br />

before applying the change. patch saves rejected differences in reversed<br />

format (which means that you can check the rejections to see if patch<br />

made the reversals correctly).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!