CSCI330              Assignment #5                     Fall 2001
                C Shell Aliases 
                      (50 points)

You can create a new command by using the C shell alias feature, or by writing a shell script. For this assignment, you will be interpreting commands and then creating C shell aliases.

Part A. INTERPRETING ALIAS/COMMANDS (2 points each; 6 points total)

a1. Enter the following commands:

a2. Enter the following command: a3. Enter the following commands: Part B. CREATING ALIASES (45 points total)

For this part of the assignment, you will create an alias that:

b1. (2 points) Create an alias definition called 'h' to display only the most recent (last) 10 commands. This alias does not accept any argument.

b2. (4 points) Redefine the 'ls' command so that its output is displayed in multiple columns and all directory names are marked with a slash (/) at the end and executable file names are marked with an asterisk at the end. This alias does not accept any argument.

Here is an example of the output of the redefined 'ls' command:

      % ls
      Assignments/  ClassList/    alias    re.file*      re.file,v*
      re.file.out
b3. (4 points) Create an alias definition called 'rename' to rename a file or a directory. This alias accepts only one argument, which is the name of a file or a directory.

b4. (5 points) Create an alias called 'printcsl' to send one or more output file to the CSL lab printer. This alias accepts one or more arguments, which is the file name(s).

b5. (5 points) Create an alias definition called 'where' to find a file and list the pathname of the file found. This alias accepts one argument, which is a file name.

b6. (7 points) Create an alias called 'cd' which will change your directory and change the command prompt to include:

This alias accepts one argument, which is the name of a directory. Note that you need to change to a directory to see your new prompt that include the above information. Each time your change to a directory, you should see information similar to this:
b7. (8 points) Create an alias called 'mylink' which will create a symbolic link (in your current working directory) to a csci330 assignment in the directory: /home/ux/krush/unix-assignments

This alias accepts one argument, which is the exact name of the assignment file. For example: assign5.fall01

Here is an example on using the 'mylink' alias.

Delete below

b8. (10 points) Create an alias called 'submit' which will submit a csci 330 assignment file to your instructor and T.A. This alias accepts two arguments: a subject line (no space between words) and a file name.

For students in sections 1 and 5, your alias should submit the assignment file to: krush and z018017. For students in sections 3 and 7, your alias should submit the assignment file to: krush and z987658.

Here is an example of using the 'submit' alias to submit Part A of assignment 5:

Note: You should first test your 'submit' alias by sending the file to yourself first. Once your alias works properly, then include 'krush z018017' or 'krush 987658' to your alias definition.