Search Header Logo

Linux Creating Scripts

Authored by Patrick Hines

Computers

Professional Development

Used 8+ times

Linux Creating Scripts
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

You want to automate a daily task of backing up your important documents directory to an external USB drive. Which scripting language is commonly used for shell scripting in Linux?

Python
Java
C++
Bash

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

You've written a script that needs to prompt the user for a filename. How can you achieve this within the script?

print "Enter filename:"
echo "Enter filename:"
read filename
ask filename

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Your script needs to check if a specific file exists before proceeding. Which command can help determine this?

show file
find file
test -f file
check file

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

You accidentally made a typo in your script and it won't run. How can you quickly identify and fix errors in your script?

run the script
debug the script
check syntax
compile the script

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Your script performs calculations and needs to store a result as a variable. How can you assign a value to a variable within the script?

result = calculation
set result = calculation
declare result = calculation
define result = calculation

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

A section of your script needs to be executed repeatedly until a specific condition is met. Which loop construct can achieve this?

while condition
for loop
if statement
until condition

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

You want your script to display a custom message after completing its tasks. How can you output text to the console within the script?

print message
echo message
write message
display message

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?