Unix - Filters and Commands


 Profilers are

A. Tools that analyze the run time behaviour of a program
B. Tools that check a C code for cross file consistency
C. Tools that keep track of evolving versions of a file
D. None of the above

Option: A

Explanation :


The shell command :

A. Does nothing
B. Can be used to cause infinite looping
C. Can take arguments but it cannot act on them
D. All of these

Option: D

Explanation :


Which of the following tools can be used to keep track of evolving versions of a file

A. make
B. yacc
C. sccs
D. dv

Option: C

Explanation :
sccs stands for Source Code Control System. Many applications need periodical updation of files (e.g., master file in a business application). It is always better to have backup of the changed version. for security reasons and undo operations. SCCS is a UNIX tool that can be used to keep history of the changes made


The .(dot) shell command

A. Can take command line argument
B. Will fork a child shell to execute the named shell script
C. Can be used to change the environment of the current shell
D. All of the above

Option: C

Explanation :
Any shell script will not be executed hy the current shell. The current shell forks a new shell that executes the named shell script and terminates after it. So, any variable exported in the shell script will not be recognized by the parent shell. The (dot) command makes the named shell script to be executed by the current shell. On the negative side . (dot) commands like( profile) don't accept command line arguments.




is a macro processor


can he used to preprocess C code


can be used to preprocess assembly language program


none of the above


Option: C

Explanation :

cpp is 'C' preprocessor, m4 is a general purpose macro processor that can he used to pre-process C. as well as assembly language programs. Unlike cpp, it can do integer arithmetic. some string and substring manipulation, in addition to tile inclusion and conditional macro expanion which can be done by cpp also

Suggest an improvement