Google News
logo
Unix - Interview Questions
What do you understand by command substitution?
Command substitution is the method that is performed every time the commands that are enclosed in backquotes are processed by the shell.  This process replaces the standard output and displays it on the command line.

Command substitution can perform the following tasks :

* Invoke subshell
* Result in word splitting
* Remove trailing new lines
* Using the ‘redirection’ and ‘cat’ commands, allows setting a variable to the content of the file.
* Allows setting a variable to the output of the loop
Advertisement