题目内容

In search patterns, what is the syntax to match the end of the string?

A. .
B. ^
C. $
D. *

查看答案
更多问题

Which command will combine two files that share a common field?

A. merge
B. paste
C. join
D. cat

Identify the command option that should be present in the paste command to combine two files with a specified delimiter.

A. -d
B. -n
C. -t
D. -r

Consider a data file /usr/data/employee that contains the information of 300 employees, in the following format:(emp-name:age:date-of-birth). Select the correct syntax of the awk command that prints the name and date-of-birth.

A. $ awk -F: '{ print $1 ; $3 }' /usr/data/employee
B. $ awk -F: '{ print $1 & $3 }' /usr/data/employee
C. $ awk -F: '{ print $1 $3 }' /usr/data/employee
D. $ awk -F: '{ print $1 - $3 }' /usr/data/employee

Which of the following commands will replace all instances of the word "dog" with "pig" in the file named "some_file" and send the output to stdout? Select all answers that apply.

A. sed -e s/dog/pig/g some_file
B. sed -e s/dog/pig/ some_file
C. sed -e s:dog:pig:g some_file
D. cat some_file | sed -e s/dog/pig/g

答案查题题库