Podcast
Questions and Answers
What is the correct way to change the value of a variable in a shell?
What is the correct way to change the value of a variable in a shell?
- Use the set command to update the variable value
- Specify the variable name followed by a colon and the new value
- Use the env command to update the variable value
- Specify the variable name followed by an equal sign and the new value (correct)
What is the purpose of the UMASK variable in the BASH shell?
What is the purpose of the UMASK variable in the BASH shell?
- It lists all exported environment and user-defined variables
- It performs a specialized function in the shell and must be set by the alias command
- It sets the default permissions for newly created files (correct)
- It is used to create shortcuts to commands
What is the name given to temporary shells created by the current shell?
What is the name given to temporary shells created by the current shell?
- Parent shell
- Sibling shell
- Subshell (correct)
- Child shell
Which of the following characters is NOT allowed as the first character of a variable identifier?
Which of the following characters is NOT allowed as the first character of a variable identifier?
What is the purpose of the alias command?
What is the purpose of the alias command?
What is the convention for capitalizing variable identifiers?
What is the convention for capitalizing variable identifiers?
What is the purpose of the less command in the pipeline ls –l /etc | less?
What is the purpose of the less command in the pipeline ls –l /etc | less?
What type of variable is defined by the user in a BASH shell?
What type of variable is defined by the user in a BASH shell?
What command is used to view the contents of a specified variable in a BASH shell?
What command is used to view the contents of a specified variable in a BASH shell?
What type of variables are useful when executing commands and creating new files and directories in a BASH shell?
What type of variables are useful when executing commands and creating new files and directories in a BASH shell?
What is the purpose of the pipe character (|) in a command?
What is the purpose of the pipe character (|) in a command?
Where are environment variables set by default in a BASH shell?
Where are environment variables set by default in a BASH shell?
What happens to variables stored in memory when you exit a BASH shell?
What happens to variables stored in memory when you exit a BASH shell?
What is the purpose of environment files in BASH?
What is the purpose of environment files in BASH?
What is the first line in a shell script called?
What is the first line in a shell script called?
How can you execute a shell script if you have read permission to it?
How can you execute a shell script if you have read permission to it?
What is required to execute a shell script like any other executable program on the system?
What is required to execute a shell script like any other executable program on the system?
What is the issue with the output shown in the text?
What is the issue with the output shown in the text?