Previous Section  < Day Day Up >  Next Section

LAB 53: VARIABLES

  1. What is a positional parameter? Type at the command line:

    
    set dogs cats birds fish
    
    

    1. How do you list all of the positional parameters?

    2. Which positional parameter is assigned birds?

    3. How do you print the number of positional parameters?

    4. How do you remove all the positional parameters from the shell's memory?

  2. What is an environment variable? What is the command used to list them? Create an environment variable called CITY and assign it the value of your hometown. How do you export it?

  3. What is a local variable? Set a local variable to your name. Print its value. Unset it.

  4. What is the function of declare –i?

  5. What does the $$ variable display? What does the $! display?

    Previous Section  < Day Day Up >  Next Section