Adblocker Detected
Quizack provides Online Quiz and Practice MCQs for Free. Please disable your Ad-Blocker so we can earn from ads and keep this project alive.
Learn and practice your skills with our MCQ question answers to improve your knowledge. MCQs list
Start Practice with MCQsQuizack 10 minutes test will assess your knowledge and give you comprehensive results along feedback.
Start QuizDownload Free Unix Shell Script MCQ questions answers PDF to practice and learn while are offline.
Download PDF
Used by 100s of Jobseekers and students
Focused questions for skill assessment
Premium questions with correct answers
What will be the output of the following program assuming that the command line arguments are Unix shell scripting?
for argument in *
do
echo $argument
done
An error will occur
Unix shell scripting
Unix shell scripting
shell
The names of all files in the current directory would be displayed
Answer: The names of all files in the current directory would be displayed
What is the error in the following shell script code?
#!/bin/sh
1. a=12.25 b=12.52
2. if [a=b]
3. then
4. echo "\na and b are equal"
5. fi
There is no error
Variable declaration on line 1 is incorrect
The statement to be printed with echo on line 4 should be within curly brackets
fi should be replaced by endif on line 5
On line 2, [a=b] should be replaced with [ $a -eq $b ]
Answer: On line 2, [a=b] should be replaced with [ $a -eq $b ]