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.

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

magic<br />

Usage Notes<br />

Examples<br />

test will succeed only when a string value exactly matches the bytes from<br />

the file. The string value field can contain at most 127 characters per magic<br />

line.<br />

If the value is a string, it can contain the following sequences:<br />

\character<br />

The backslash-escape sequences as specified in the Base Definitions<br />

volume of IEEE Std 1003.1-2001, Table 5-1, Escape Sequences and<br />

Associated Actions ( ’\\’, ’\a’, ’\b’, ’\f’, ’\n’, ’\r’, ’\t’, ’\v’ ). In addition, the<br />

escape sequence ’\ ’ (the character followed by a <br />

character) will be recognized to represent a character.<br />

\octal<br />

Octal sequences that can be used to represent characters with specific<br />

coded values. An octal sequence will consist of a backslash followed by<br />

the longest sequence of one, two, or three octal-digit characters<br />

(01234567).<br />

By default, any value that is not a string will be interpreted as a signed<br />

decimal number. Any such value, with a leading 0x or 0X, will be interpreted<br />

as an unsigned hexadecimal number; otherwise, with a leading zero, the<br />

value will be interpreted as an unsigned octal number. To maintain<br />

compatibility with other systems, numeric values are not subject to bounds<br />

checking. Use numeric values that match the specified type.<br />

Operators only apply to nonstring types: byte, short and long. The default<br />

operator is = (exact match). The operators are:<br />

= Equal.<br />

! Not equal.<br />

> Greater than.<br />

< Less than.<br />

& All bits in pattern must match.<br />

^ At least one bit in pattern must not match.<br />

x or ? Any value matches (must be the only character in the field). ? is an<br />

extension to traditional implementations of magic.<br />

(d) The rest of the line is the message string to be printed if the particular file<br />

matches the template. Note that the contents of this field is ignored if the<br />

line begins with the & continuation character. The fourth field may contain a<br />

printf ()-type format indicator to output the magic number (see printf for<br />

more details on format indicators). If the field contains a printf ()-type<br />

format indicator, the value read from the file will be the argument to printf.<br />

1. Characters from a code page other than IBM-1047 should not be added to the<br />

/etc/magic file (the default magic file).<br />

2. Characters from a code page other than IBM-1047 can be used in alternate<br />

magic files that are specified by the –m or -M option on the file command.<br />

These characters should only be used in the third field of the magic file<br />

template when the field type is string. They will only match files containing<br />

these characters when the file command is invoked in the non-IBM-1047 locale.<br />

Here are some sample entries:<br />

0 short 0x5AD4 D<strong>OS</strong> executable<br />

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

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

Saved successfully!

Ooh no, something went wrong!