LAB 41: VARIABLE EXPANSION OF SUBSTRINGS

 <  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  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net