adplus-dvertising
frame-decoration

Question

Which of the following will be used to print lines containing ‘manager’ in emp.lst?

a.

awk ‘/manager/ { print }’ emp.lst

b.

awk ‘/manager { print }’ emp.lst

c.

awk ‘/manager/ { print } emp.lst

d.

awk ‘manager { print }’ emp.lst

Answer: (a).awk ‘/manager/ { print }’ emp.lst

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following will be used to print lines containing ‘manager’ in emp.lst?

Similar Questions

Discover Related MCQs

Q. The default action if selection_criteria is missing is ____

Q. For pattern-matching, awk uses regular expressions in ____ style.

Q. awk uses ______ for splitting a line into fields.

Q. ____ section can be used if we’ve to print something before processing the first line.

Q. ____ function breaks up a string on the basis of delimiter.

Q. For running a UNIX command within awk, we’ve to use ____ function.

Q. sqroot(x) function returns the square root of x.

Q. Which of the following is supported by awk?

Q. print statement is necessary for printing a line.

Q. awk uses _____ dimensional arrays.

Q. awk has some built-in functions which are used for arithmetic and string operations.

Q. Which of the following is a built-in function for awk?

Q. The _____ function extracts a substring from a string.

Q. awk makes a distinction between numeric and string variables.

Q. Which one of the following is the most powerful filter?

Q. A perl program runs in a special interpretive mode.

Q. To test whether perl is in your PATH, use ____

Q. It is often more convenient to save perl program files with ____ extension.

Q. ___ function is used for removing the last character from the line.

Q. perl variables have no type and no initialization.