|
INTERVIEW QUESTIONS
OPERATING SYSTEMS
UNIX COMMANDS
DETAILS
Question: Explain the steps that a shell follows while processing a command.
Answer: After the command line is terminated by the key, the shel goes ahead with processing the command line in one or more passes. The sequence is well defined and assumes the following order. Parsing: The shell first breaks up the command line into words, using spaces and the delimiters, unless quoted. All consecutive occurrences of a space or tab are replaced here with a single space. Variable evaluation: All words preceded by a $ are avaluated as variables, unless quoted or escaped. Command substitution: Any command surrounded by backquotes is executed by the shell which then replaces the standard output of the command into the command line. Wild-card interpretation: The shell finally scans the command line for wild-cards (the characters *, ?, [, ]). Any word containing a wild-card is replaced by a sorted list of filenames that match the pattern. The list of these filenames then forms the arguments to the command. PATH evaluation: It finally looks for the PATH variable to determine the sequence of directories it has to search in order to hunt for the command.
|
|
|
Category |
Unix Commands Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7971 users |
Added on |
10/25/2009 |
Views |
77229 |
Rate it! |
|
|
Question:
Explain the steps that a shell follows while processing a command.
Answer:
After the command line is terminated by the key, the shel goes ahead with processing the command line in one or more passes. The sequence is well defined and assumes the following order. Parsing: The shell first breaks up the command line into words, using spaces and the delimiters, unless quoted. All consecutive occurrences of a space or tab are replaced here with a single space. Variable evaluation: All words preceded by a $ are avaluated as variables, unless quoted or escaped. Command substitution: Any command surrounded by backquotes is executed by the shell which then replaces the standard output of the command into the command line. Wild-card interpretation: The shell finally scans the command line for wild-cards (the characters *, ?, [, ]). Any word containing a wild-card is replaced by a sorted list of filenames that match the pattern. The list of these filenames then forms the arguments to the command. PATH evaluation: It finally looks for the PATH variable to determine the sequence of directories it has to search in order to hunt for the command. Source: CoolInterview.com
chronology exela kobe timescales telling posts displays Ambienos Portachentes avi Source: CoolInterview.com
Answered by: buy ambien 5mg | Date: 8/31/2009
| Contact buy ambien 5mg
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How is the command “$cat file2 “ different from “$cat >file2 and >> redirection operators ?
|
View Answer
|
|
Which of the following commands is not a filter man , (b) cat , (c) pg , (d) head
|
View Answer
|
|
What does the command “$ls | wc –l > file1” do?
|
View Answer
|
|
What does the command “ $who | sort –logfile > newfile” do?
|
View Answer
|
|
What is the significance of the “tee” command?
|
View Answer
|
|
Explain the following commands.
|
View Answer
|
|
Construct pipes to execute the following jobs.
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Unix Commands Interview Questions & Answers - Exam Mode /
Learning Mode
|