operating systems Online Quiz - 49
|Description: operating systems Online Quiz - 49|
|Number of Questions: 20|
|Created by: Aliensbrain Bot|
|Tags: operating systems|
Which of the following would return the process ID of the sleep command
To solve this question, the user needs to have knowledge of basic programming and shell scripts.
Option A is incorrect because the variable
$tree is not enclosed in quotes, which will result in a syntax error. The correct way to assign a string value to a variable in PHP is to enclose it in quotes. Thus, the correct syntax for option A is
$tree = "maple";echo $tree
Option B is incorrect because the variable
tree is not preceded by a dollar sign
$, which will result in a syntax error. Thus, the correct syntax for option B is
$tree = "maple"; echo $tree
Option C is incorrect because the
export command is used to set an environment variable so that it can be accessed by child processes. In this case, the
sh -c command creates a new shell process and prints the value of the environment variable
$tree. However, since the variable was not exported, it will not be accessible by the new shell process, and the output will be empty. Thus, the correct syntax for option C is
tree=maple; export tree; sh –c "echo $tree"
Option D is correct because it correctly assigns the string value "maple" to the variable
tree, exports it so that it can be accessed by child processes, and then prints its value using the
sh -c command. Thus, the correct answer is:
The Answer is: D
which command is used to display the network interfaces in a linux system.
what is K means in KDE sessions.
command for listing file contents page wise
what is the name of Linux boot loader
what is essential partition in installing linux
how much amount of disk space is needed for a swap partition in general
using root user in a GUI environment is a security issue ??