Q:
                    
                
                                    The output of the following command will be:
belongs to collection: UNIX - FILTERS AND REGULAR EXPRESSIONS MCQ
UNIX - FILTERS AND REGULAR EXPRESSIONS MCQ
- Which option is used with pr command to display output along with line numbers?
- -h option is used with pr command to add a header of our choice
- ___ operator is used with pr command to start printing from a specific page
- Which command is used for displaying the beginning of a file?
- By default, how many lines are displayed using the head command?
- Which option is used with the head command to specify line count to display?
- ___ command is used for displaying the end of the file
- We can also use -n option with tail command
- Which symbol is used with the tail command to print the file from the selected line?
- Which of the following command is incorrect?
- To extract specific columns from a file, ____ command is used
- The expression cut -c -3 emp.lst will cut columns number _____
- ____ option is used with the cut command for cutting fields
- What is the default delimiter used by the cut command for cutting fields?
- Which option is used with the cut command for cutting field base on the value of our specified delimiter?
- We have to specify whether we want to cut fields or columns while using cut command
- The following command will produce an error
- Which one of the following commands is incorrect?
- Which command is used for pasting files?
- Whatever we have cut using cut command can be pasted back using paste command but vertically
- By default, sort command reorders lines in ASCII collating sequence
- Sort command uses ____ as default field delimiter
- Which option is used with sort command to specify the field delimiter?
- Which option is used for sorting a file according to primary key?
- The sort order can be reversed using ___ option
- We can perform sorting on secondary key also using sort command
- We cannot perform sorting on columns using sort command
- Which option is used when we’ve to sort files containing only numbers?
- _____ option is used with sort command for removing repeated lines
- Which option is used by the sort command to redirect the output to a specified file?
- To check whether the file has actually been stored in the default order, we can use ____ option
- Which option is used with sort command to sort multiple files collectively?
- Which option is used for selecting repeated entries?
- ______ option is used for counting frequency of occurrence
- The output of the following command will be:
- Which command is used for translating characters?
- To replace | with ~, which one of the following commands will be used?
- head -n 3 emp.lst | tr ‘[a-z]’ ‘[A-Z]’
- Which option is used with tr command for deleting characters?
- ______ option is used for compressing multiple consecutive characters
- If there are special characters in a pattern, then we’ve to enclose them in ______
- Which option is used with grep command for ignoring the case in pattern searching?
- Which option is used with grep command for deleting lines?
- Which option is used for displaying the line numbers containing the pattern along with lines?
- ______ option counts the number of lines containing the pattern?
- Which option displays only the filename containing the pattern?
- _____ option is used when we need to match multiple patterns in a single invocation of grep command?
- For taking patterns from a file, -f option is specified with grep command
- POSIX identifies regular expressions as belonging to ____ categories
- grep command supports both extended and regular expressions
- Character class is used for matching a group of characters enclosed within a pair of _____
- The following command will match ‘Agarwal’, ‘agarwal’ and ‘agrawal’
- Which of the following symbol is used for matching the immediate preceding character?
- Which symbol is used for matching a single character?
- Which of the following symbols are used for matching a pattern at specified locations?
- The following command will match the lines beginning with ‘2’
- Which of the following symbols are a set of ERE (extended regular expressions) ?
- Which option is used when we want to use an ERE with grep command?
- Which of the following symbols are used for matching multiple patterns?
- To perform context addressing, we have to enclose the pattern in ____
- To select lines containing gupta and agarwal, which command will be used?
- To write selected lines, ____ is used with sed
- Which built-in variable is used by the awk to specify the line numbers?
- What is the default delimiter used by awk?
- The printf function uses ___ for string data and ___ for numeric
- awk doesn’t use $ in evaluation or assignment of variables
- A user-defined variable is initialized to ____
- awk uses ___ operator for concatenating strings
- awk uses __ and __ as comparison operators
- awk allows the user to use variables of his own choice
- Which option is used for storing awk programs in a file?
- ____ section can be used if we’ve to print something after processing the last line
- awk uses ____ for providing comments
- Which of the following is a built-in variable for awk?
- FS defines the field separator
- Which built variable is used for defining the field delimiter in the output?
- The ____ variable stores the name of the file currently being processed
- Which of the following is not a built-in variable used by awk?
- awk supports the use of arrays
- Which of the following is not true about awk arrays?
- Which of the following is an associative array?
- Which function is used by perl for displaying the length of a string?
- ___ function returns the first occurrence of a character in a string
- For extracting a substring, ____ function is used
- substr function is also used to alter an existing string
- Which function is used by perl for reversing a string?
- Which function is used for handling substitutions in perl?
- Which escape character is used for identifying a word character?
- We can use find command for testing files with perl
- Which of the following is referred to as default variable?
- ___ operator is used for selecting current line number
- ___ is known as range operator
- The command @x=(1. .10) will assign first ten integer values to the array ‘a’
- The ___ prefix to an array name signifies the last index of the array
- For deleting the elements from the left of the array ___ function is used
- For deleting the elements from the right of the array ___ function is used
- To add elements to the left side of the array ____ function is used
- To add elements to the right side of the array ____ function is used
- Which function can combine the functionalities of push, pop, unshift and shift?
- Perl also supports use of for loop in the following manner
- For splitting a line or expression into fields, __ is used
- ___ function is used for joining lists
- perl is ____ of grep, tr, sed and awk
- The following will display :
- Filter’s are a category of commands that take the advantage of shell redirection feature
- Which command is used for preparing a file for printing?
- pr command adds ____ lines of margin at the top and bottom
- Which option is used with pr command for printing multi-columnar output?
- Which option is used with pr command to suppress the header and footers?
- Which option is used with the tail command for extracting bytes instead of lines?
- paste command uses space as the default field delimiter
- _____ option is used with paste command if we want to specify our own delimiter
- Which option is used with paste command for joining lines?
- ____ command is used for sorting a file on specified fields
- The name of the input and output files cannot be same while using sort command
- Which command is used for locating repeated and non-repeated lines?
- uniq command requires a sorted file as input
- Which option is used with uniq command for selecting non-repeated lines?
- Which one of the following command is used for searching for a pattern in one or more file(s)?
- Which one of the following is the correct syntax for grep command?
- Which one of the following command will be used for searching “director” in emp.lst?
- When the pattern is not found in a file, grep command silently returns the prompt
- grep command can be used for searching a pattern in more than one file
- Which of the following is not a subset of BRE (basic regular expression) character subset?
- Which of the following commands is known as stream editor?
- What is the correct syntax for using sed?
- Which one of the following command will be used for quitting after selecting 3 lines from file emp.lst?
- Which of the following command is used with sed for outputting as well as printing the selected lines?
- To suppress the behaviour of ‘p’ command, we use ____ option
- The command $ sed -n ‘$p’ emp.lst will display the last line
- Consider the following commands
- Which option is used with sed for using multiple instructions?
- ____ option is used for taking instructions from a file
- sed can also perform the substitution
- Which one of the following is the correct syntax for performing substitution using sed?
- Which one of the following command is used for replacing | with : globally?
- To replace the string ‘director’ in the first five lines of file emp.lst with ‘manager’ we can use _____
- Which of the following characters are used with sed as anchoring characters?
- What will be the function of the following command?
- Basic regular expressions are divided into ______ categories
- The interval regular expression uses the character _______
- Which one of the following command will be used for adding two spaces before every line in emp.lst?
- Which shortcut does sed offer to replace the string Linux with Red hat Linux?
- Which command will be used for selecting lines 3 to 10 from emp.lst?
- Which filter apart from perl, is the most powerful?
- Awk filter operates at field level
- Which of the following will be used to print lines containing ‘manager’ in emp.lst?
- The default action if selection_criteria is missing is ____
- For pattern-matching, awk uses regular expressions in ____ style
- awk uses ______ for splitting a line into fields
- ____ section can be used if we’ve to print something before processing the first line
- ____ function breaks up a string on the basis of delimiter
- For running a UNIX command within awk, we’ve to use ____ function
- sqroot(x) function returns the square root of x
- Which of the following is supported by awk?
- print statement is necessary for printing a line
- awk uses _____ dimensional arrays
- awk has some built-in functions which are used for arithmetic and string operations
- Which of the following is a built-in function for awk?
- The _____ function extracts a substring from a string
- awk makes a distinction between numeric and string variables
- Which one of the following is the most powerful filter?
- A perl program runs in a special interpretive mode
- To test whether perl is in your PATH, use ____
- It is often more convenient to save perl program files with ____ extension
- ___ function is used for removing the last character from the line
- perl variables have no type and no initialization
- When a string is used for numeral computations, perl converts it into ___
- If a variable is undefined, its value is ____
- Which of the following are concatenation operators?
- To repeat a string, perl uses ___ operator
- We can specify filenames in command line using perl
- For looping in a list, ____ is used
- Context switch changes the process mode from
- File x .c has 5 lines of code. The command
- We can specify the filename with ‘:w’ command
 
                         
        
 
     Unix operating system
Unix operating system
(d).process foo1 and output is stored in foo2
need an explanation for this answer? contact us directly to get an explanation for this answer