Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 4 Regular Expressions are used by some commands for pattern matching. T

ID: 3905219 • Letter: Q

Question

QUESTION 4

Regular Expressions are used by some commands for pattern matching.

True

False

2 points   

QUESTION 5

The program 'tr' is a UNIX Filter.

True

False

2 points   

QUESTION 6

The command

grep '^$' file | wc -l

count all the lines in a file which are empty.

True

False

2 points   

QUESTION 7

The command

sed 's/a/b/g'

produces the same output as running the command

sed 's;a;b;g'

True

False

2 points   

QUESTION 8

True

False

Assuming file has 200 lines, the command sed -n '10,15p' file prints only lines 10 though 15 of that file

Explanation / Answer

4)Answer:

True

Explanation:

Regular expressions, that defines a pattern in a string, are used by many programs such as grep, sed, awk, vi, emacs etc.

5)Answer:

True

Explanation:

tr (Unix) tr is a command in Unix-like operating systems. It is an abbreviation of translate or transliterate, indicating its operation of replacing or removing specific characters in its input data set.