UNIX Shells by Example (4th Edition)

 <  Day Day Up  >  

  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 .

 <  Day Day Up  >  

Категории