Command Line Alias Substitution

This section provides a quick introduction of C shell command line alias substitution.

C Shell Command Line Alias Substitution: Replaces user defined aliases with their definitions.

Aliases can be defined with the "alias" command. For example, the following command defines an alias of "dir" with the definition of "ls -al". With this alias, you can use the DOS command "dir" to list files in the current directory:

%alias dir 'ls -al'

Another example, the following command defines an alias of "rm" with the definition of "rm -i". With this alias, running the "rm" command becomes running "rm -i" to make the command safer, asking you for a confirmation before removing a file:

%alias rm 'rm -i'

Examples of C shell command line alias substitution:

>csh
%alias dir 'ls -al'
%alias rm 'rm -i'
%dir
drwx--x--x   6 herong   users        1024 Jul 21 21:56 .
drwxr-xr-x   4 root     root         1024 May 24 22:03 ..
-rw-r--r--   1 herong   users         242 Jul 21 21:56 .cshrc
-rw-r--r--   1 herong   users          76 Jan  4 03:15 .login
-rwxr-xr-x   1 herong   users        3992 Aug 19 10:19 a.out
-rw-r--r--   1 herong   users          40 Aug 19 10:18 hello.c
-rw-r--r--   1 herong   users           0 Jul 21 21:56 new file
%rm a.out
rm: remove `a.out'? n
%ls -l a.out
-rwxr-xr-x   1 herong   users        3992 Aug 19 10:19 a.out

Table of Contents

 About This Book

 2002 - .NET Framework Developed by Microsoft

 1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf

 1995 - Java Language Developed by Sun Microsystems

 1991 - WWW (World Wide Web) Developed by Tim Berners-Lee

 1991 - Gopher Protocol Created by a University of Minnesota Team

 1984 - X Window System Developed a MIT Team

 1984 - Macintosh Developed by Apple Inc.

 1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman

 1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer

 1978 - Bash (Bourne-Again Shell) Developed by Brian Fox

1978 - The C Shell Developed by Bill Joy

 What Is the C Shell

 C Shell Command Line

 Command Line History Substitution

Command Line Alias Substitution

 Command Line Input and Output Redirection

 Command Line Variable Substitution

 C Shell Command Line Examples

 ".cshrc" - C Shell Script File and

 1977 - The Bourne Shell Developed by Stephen Bourne

 1977 - Apple II Designed by Steve Jobs and Steve Wozniak

 1976 - vi Text Editor Developed by Bill Joy

 1974 - Internet by Vinton Cerf

 1972 - C Language Developed by Dennis Ritchie

 1971 - FTP Protocol Created by Abhay Bhushan

 1970 - UNIX Operating System Developed by AT&T Bell Labs

 1957 - FORTRAN Language Developed by IBM

 References

 Full Version in PDF/EPUB