Which of the following Unix command(s) can be used to check if the variable a st
ID: 3698665 • Letter: W
Question
Which of the following Unix command(s) can be used to check if the variable a stores a string starting with "Exam" ?....
2) Which of the following Unix command(s) can be used to check if the variable a storesa string starting with "Exam" ? (Hint: if it is true, the return value of the command should be 0) (a) expr Sa Exam* (b) expr -match Sa "Exam*" (c) test Sa - 'Exam. (d) echo Sa | grep *Exam.*S 3) The following statements are related to the background process in Unix. Which one is (are) the true statement(s)? (a) To run a process in the background, we should put the special symbol > at the end of the (b) A program is executing in background can still reads from standard input. c) Ifa program executes in background, the output of the program would not be displayed on screen in any cases (d) Background process can start a new subshell. 4) To inhibit wildcard substitution when echoing a string, we can use (a) Double quotes b) Grave accent (c) Single quote (d) Backslash 5) Which statement below is incorrect for shell and shell scripting? (a) Shell scripting is a sequence of Unix commands written in a plain text file (b) Shell is a command interpreter (c) Shell is an interface between a user and operating system. (d) The prompt in terminal is displayed by shell.Explanation / Answer
below are the answers:
2. d
only echo command returned value as 0
3. b. c. d
4. d
5. d
9.d
d is incorrect syntax
10. d
Reason: Mathematical operations can not be performed on data type Char
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.