Previous Section  < Day Day Up >  Next Section

LAB 41: VARIABLE EXPANSION OF SUBSTRINGS

  1. Write a script that will do the following:

    1. Set a variable called mypath to your home directory.

    2. Print the value of mypath.

    3. Print just the last element of the path in mypath.

    4. Print the first element of the path in mypath.

    5. Print all but the last element of the variable mypath.

    Previous Section  < Day Day Up >  Next Section