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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example<br />

Localization<br />

Usage notes<br />

Exit values<br />

The command:<br />

alias ls="ls –C"<br />

defines ls as an alias. From this point onward, when you issue an ls command, it<br />

produces multicolumn output by default.<br />

alias in the tcsh shell examples<br />

To alias the !! history command, use \!-1 instead of \!\!. For example:<br />

alias mf ’more \!-1$’<br />

creates an alias for looking at the file named by the final argument of the previously<br />

entered command. Example output would be the following:<br />

alias mf ’more \!-1$’<br />

echo "We love tcsh." > file1<br />

mf<br />

We love tcsh.<br />

"file1" (EOF)<br />

where mf pulls the last argument of the previous command (file1), and then<br />

displays that file using the more command.<br />

alias uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v NLSPATH<br />

See Appendix F, “Localization” for more information.<br />

1. alias is a built-in shell command.<br />

2. Because exported aliases are only available in the current shell environment<br />

and to the child processes of this environment, they are not available to any<br />

new shell environments that are started (via the exec sh command, for<br />

example). To make an alias available to all shell environments, define it as a<br />

nonexported alias in the ENV file, which is executed whenever a new shell is<br />

run.<br />

0 Successful completion<br />

1 Failure because an alias could not be set<br />

2 Failure because of an incorrect command-line option<br />

If you define alias to determine the values of a set of names, the exit value is the<br />

number of those names that are not currently defined as aliases.<br />

alias<br />

Chapter 2. Shell command descriptions 13

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

Saved successfully!

Ooh no, something went wrong!