Previous Section  < Day Day Up >  Next Section

LAB 35: ALIASES AND FUNCTIONS

  1. What command lists all the aliases currently set?

  2. What command lists all the tracked aliases?

  3. Create aliases for the following commands:

    
    date +%T
    
    history –n
    
    ls –alF
    
    rm –i
    
    cp –i
    
    print
    
    

  4. How do you export an alias?

  5. Create a function that contains the following commands:

    
    ls –F
    
    print –n "The time is"
    
    date +%T
    
    print –n "Your present working directory is"
    
    pwd
    
    

  6. Execute the function.

  7. Now create your own functions, using positional parameters to pass arguments.

  8. What command lists the functions and their definitions?

  9. Try some of the print options.

    Previous Section  < Day Day Up >  Next Section