Test Your Knowledge

   

1:

Just after login, you issue the command echo HOME . What will be the output of this command?

  1. It displays the HOME directory name of the user .

  2. It displays nothing, as the HOME variable is not yet defined.

  3. It displays the word HOME .

  4. none of the above

2:

What is not true about the PATH variable?

  1. It shows the path of the current directory.

  2. It shows the names of directories that are checked when searching for a command.

  3. It is usually set in the /etc/profile by the system administrator.

  4. The value of the PATH variable can be changed by a user.

3:

You have a variable " ABC " with value " Alphabets ". You use the following command to change its value.

 ABC='All $ABC' 

What will be the new value of the variable?

  1. All $ABC

  2. All Alphabets

  3. All ABC

  4. The variable value can't be changed with this command. It remains " Alphabets ".

4:

To assign the output of a command to a variable, we use:

  1. double-quote characters

  2. comma characters

  3. single-quote characters

  4. back-quote characters

5:

The value of the PS2 variable on your system is " > " (greater-than symbol). You issue an incomplete command. What will be the shell's response?

  1. The shell will issue an error message showing that the command is incomplete.

  2. The shell will display " PS2 ".

  3. The shell will try to execute that part of the command that is supplied.

  4. The shell will give a " > " prompt and wait for you to complete the command.

6:

What is wrong with the shell variable name 3Xyab2 ?

  1. It is not a legal name, because a shell variable must contain only uppercase letters .

  2. It is not legal, because variables can only have uppercase or lowercase letters, not a combination.

  3. It starts with a digit, so it is not a legal name.

  4. It ends with a digit, so it is not a legal name.


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

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