
Power of Command Line Pt1
Flashcard
•
Instructional Technology
•
Professional Development
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

28 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the proper command to use to compress the file filename.txt into the zip archive called myfile.zip?
Back
zip myfile.zip filename.txt
Answer explanation
The syntax for zipping a file into a zip archive is "zip myfile.zip filename.txt".
2.
FLASHCARD QUESTION
Front
What statement is used to get input from the terminal when a shell script is being run?
Back
read
Answer explanation
The read command is used to get input from the terminal when using a shell script.
3.
FLASHCARD QUESTION
Front
Consider the following script:
#!/bin/bash
ip=`route -n | grep UG | tr -s “ “ | cut -f 2 -d “ “`
echo “Checking to see if $ip is up..."
ping -c 5 $ip
What does the script output?
Back
Checking to see if ipaddress is up...
Answer explanation
The line in the script that starts with the echo command will cause the string, "Checking to see if $ip is up…" will be executed. When this is executed, the value of $ip will be replaced with the result of the command in the second line (which contains route).
4.
FLASHCARD QUESTION
Front
Which option can be used with tail to print the last 10 lines of a file and then keep printing any new lines that may be added continuously? Options: -n, -f, -x, -a
Back
-f
Answer explanation
The -f option is used to "follow" the contents of the file. This lets tail print the last 10 lines of a file (usually a log file) and continue to print out new lines to the screen as they are added to the file.
5.
FLASHCARD QUESTION
Front
Which command is used to make a shell variable known to subsequently executed programs?
Back
export
Answer explanation
The command export is used to make a shell variable known to subsequently executed programs. Essentially, the export command creates a globally accessible variable when it is run.
6.
FLASHCARD QUESTION
Front
What option can be used with cat to display line numbers with the text of a file to the screen? Options: #, -x, -n, -1
Back
-n
Answer explanation
The -n option will show the line numbers next to a file's contents when displayed to the screen. For example, "cat -n song.txt" will display the contents of the song.txt file with line numbers down the left column of the display.
7.
FLASHCARD QUESTION
Front
What is one of the most basic features of a shell script? Options: The ability to compile programs, The ability to run commands, The ability to ask for user input, The ability to display command output information
Back
The ability to run commands
Answer explanation
A shell script is a computer program designed to be run by the shell. Typical operations performed by shell scripts include file manipulation and command execution. The most basic scripts run commands in serial order and do not provide any output back to the screen or seek input from a user.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
22 questions
Sustainable Event Management and Environmental Impacts
Flashcard
•
KG
20 questions
Flashcards vocabulary ODS 14 (Life Below Water).
Flashcard
•
Professional Development
20 questions
Financial Communication Flashcards
Flashcard
•
KG
20 questions
Biochemistry: Proteins and Amino Acids
Flashcard
•
KG
19 questions
Engineering Innovations Flashcard
Flashcard
•
University - Professi...
24 questions
U18 - R9 - Is the era of artificial speech translation upon us?
Flashcard
•
University
24 questions
Mastering English Language Skills
Flashcard
•
University
15 questions
Consumer Psychology - Advertising
Flashcard
•
Professional Development
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Instructional Technology
44 questions
Would you rather...
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
12 questions
Mardi Gras Trivia
Quiz
•
Professional Development
14 questions
Valentine's Day Trivia!
Quiz
•
Professional Development
7 questions
Copy of G5_U5_L14_22-23
Lesson
•
KG - Professional Dev...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development