Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2) Which of the following Unix command(s) can be used to check if the variable a is equal to the string exam2 or not ?

image text in transcribed

2) Which of the following Unix command(s) can be used to check if the variable a is equal to the string "exam2" or not ? (a) test a "exam2" (b) [ Sa = "exam?" ] (c) a -eq "exam2"] (d) test echo Sa l grep -cx Sa -eq1 3) The following statements are related to the return value of Unix process. Which one is (are) the true statement(s)? (a) Every Unix process terminates with an exit value (b) The returned value 0 means success for Unix process. (c) All built-in commands return 0 when they fail (d) None of above 4) To inhibit command substitution when echoing a string, we can use (a) Double quotes (b) Grave accent (c) Single quote (d) Curly brace 5) How to obtain the value of command line arguments in a shell program? (a) S0 would be the first line argument, $1 would be the Second command line argument, $2 the Third, and so on (b) S1 would be the first command line argument, $2 the second, and so on $0 is the name of the script or function (c) Both a and b are correct (d) Both a and b are incorrect

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions