Menu

Class 3: Homework


You must print this sheet out and write/type answers on it!

  1. Suppose your PATH variable is /bin:/usr/bin:/usr/local/bin, What would your PATH be after the command:
    	  export PATH=$HOME/override/bin:$PATH:.
    
    
    
    
    
    	
  2. Show how and where you would set the appropriate environment variable to change your shell prompt to this when you login:
    	loginname on hostname [working directory] $
    
    For example:
    	stahl on chessie [~/public_html/IC221/Spring2008] $
    
    Just to make your life easy, you can check out this link.
    	  
    
    
    
    
    	
  3. You get sick of typing /courses/crabbe/etc/ic221-submit everytime you submit a lab. Explain exactly what you would have to do so that whenever you were logged in the command sub221 would suffice to call Dr. Crabbe's IC221 the submit script.
    
    
    
    
    
    
    
    	
  4. In a terminal window enter the following two commands:
            echo $HOMERUN
    	
    and
            echo ${HOME}RUN
    	
    and write down the results, and explain what happened in each case and why they're different.
    
    
    
    
    
    
    
    
    
    
    
    	
  5. You'd like the following message printed when you logout:
    	Day-of-week  mm/dd/yyyy  military-time
    	
    For example:
    Tue 01/19/2010 14:19:43
    	
    Write the bash command(s) you would use to do this, and indicate what dot file they should go in. (Hint: 1. try man date and 2. make sure your output looks just like what is request above!)