Modifications to your startup files

  1. Go to your home directory and edit .bash_profile to define the global variable chris whose value is the absolute pathname of my home directory.
  2. Again in .bash_profile define an alias ck which will take you to my home directory using the variable defined above.
  3. Also in .bash_profile define a function go_show, that will
    The directory this function takes you to will be specified as an argument to the function on the command line. You will need to use a positional parameter to do this.

Steps for Script

  1. Print to the terminal the value of the variable chris.
  2. Using a pipeline, grep and a command that will show all your global variables, print to the screen the full definition of the variable chris. Do not use echo to do this. The command to show all global variables was mentioned in the first class were global variables were discussed.
  3. Aliases and functions are not global, so they cannot normally be run inside a shell script.
  4. Use the function go_show to move to my home directory using the global variable chris.
  5. Run a command that will show all the aliases you have currently defined.
  6. Run a command that will show the last 20 commands in your history list.
  7. Using a single echo command print to the terminal a single string enclosed in quotes, and the variable chris. The string should print the following message:
    	    The home directory of my instructor is /home/ckelly