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.

[-k startpos[,endpos]] ...<br />

[file ...]<br />

sort [–cmu]<br />

[–o outfile]<br />

[–tchar]<br />

[–yn]<br />

[–zn]<br />

[–bdfiMnr]<br />

[+startposition[–endposition]] ...<br />

[file ...]<br />

You can see that there are two possibilities here; you would need to choose which<br />

of the two versions of sort met your requirements. In either possibility, however, we<br />

have the option:<br />

–o outfile<br />

This option tells the sort command where to save its sorted output. The form of the<br />

option is –o, followed by a space, followed by outfile. In a command format,<br />

anything appearing in italic serif font is a placeholder for information that you are<br />

expected to supply. Sometimes after the format, the kind of information expected in<br />

place of the placeholder is explained. In our sort example, outfile stands for the<br />

name of a file where you want sort to store its output. For example, if you wanted<br />

to store the output in the file sorted.dat, you would specify:<br />

sort -o sorted.dat<br />

(followed by the rest of the command).<br />

The format for sort also contains an option of the form:<br />

–tchar<br />

This is similar to the option form we were just discussing, except that there is no<br />

space between the –t and char. char in italics is a placeholder; in this case, it<br />

stands for any single character. If you want to use the –t option for sort, you just<br />

type –t followed immediately by another character, as in:<br />

sort -t:<br />

In this case, we use a colon (:) in the position of the placeholder char.<br />

The end of the sort format is:<br />

[file ...]<br />

This means a list of one or more filenames; the ellipsis (....) stands for repetitions of<br />

whatever immediately precedes it. Since there are square brackets around the<br />

previous list, you can omit the list if you like.<br />

The format of ls ended in:<br />

[pathname ...]<br />

As you might guess, this means that an ls command can end with an optional list of<br />

one or more pathnames. What’s the difference between this and our sort example?<br />

A pathname (specified with pathname) can be the name of either a file or a<br />

directory; a filename (specified with file) is always the name of a file.<br />

2 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!