In a Bash script, how do we use grep without outputting anything to the terminal?
SLG ULI101 Week 12 - Bash II

Quiz
•
Computers
•
Professional Development
•
Medium
Novell Rasam
Used 7+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
grep "REGEXP" > /dev/null 2>&1
grep "REGEXP" > /dev/null
grep "REGEXP"
grep "REGEXP"
$?
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If we wanted to check if the number of arguments doesn't equal 1, we write...
if [ $# -ne 1 ]
if [ $? -ne 1 ]
if [$# -ne 1]
if [ $1 -ne 1 ]
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the significance of double parenthesis in Bash?
Allows us to do mathematical operations
Allows us to concatenate strings
No significance over single ()
None of the above
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If we wanted our echo to overwrite the same line (so no new lines) we write...
echo -n "BLAHBLAH"
echo -ne "BLAHBLAH\r"
echo -ne "BLAHBLAH\n"
echo -ne "BLAHBLAH"
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If we wanted to loop through each argument we would write...
for thing in $@
for thing in $#
for thing in $1 $2 $3
for thing in $args
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
$@ returns?
all arguments separated by a space
all arguments with no spaces
the number of arguments
none of the above
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
To save the output of a command to a variable we write...
today=$(date -I)
today=date -I
date -I > $today
echo date -I
read today
Create a free account and access millions of resources
Similar Resources on Quizizz
24 questions
Linux commands 2

Quiz
•
Professional Development
17 questions
PHP MySQL

Quiz
•
7th Grade - Professio...
15 questions
Coding & Logic - Lesson 1

Quiz
•
Professional Development
15 questions
Javascript Datatypes and Variables(Kushal Das)

Quiz
•
Professional Development
15 questions
Python Class 1

Quiz
•
Professional Development
20 questions
JavaScript

Quiz
•
Professional Development
17 questions
Preguntas NS7 - Test No. 2

Quiz
•
Professional Development
22 questions
Comandos de Linux - Quiz

Quiz
•
Professional Development
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade