Search Header Logo

Simple Shell Programming – Passage-Based Quiz

Authored by sathi v

others

Used 1+ times

Simple Shell Programming – Passage-Based Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

1. Which command did Divya use to get user input in her first script?

input
read
scan
gets

2.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

2. Which command is used to print text in a shell script?

say
print
display
echo

3.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

3. To calculate the sum of first `N` numbers, which loop structure did Divya use?

while
for
repeat
until

4.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

4. What operator did Divya use to check whether a number is even or odd?

/
*
%
==

5.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

5. Which of the following refers to the first command-line argument in a shell script?

$0
$1
$@
arg1

6.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

6. What is the purpose of `chmod +x script.sh`?

Compile the script
Edit the script
Make the script executable
Rename the script

7.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

7. How did Divya run her script from the terminal after making it executable?

bash script.sh
./script.sh
run script.sh
execute script.sh

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?