Add a new built-in path command in self-made Shell
Add a new built-in path command that allows users to show the current pathname list, append one pathname, or remove one pathname. In your shell implementation, you may keep a data structure to deal with the pathname list. If you do not use execle() or execve() that allows you to execute with your own environment variables, you will need to add it to the “real” PATH environment variable for executables in the path to work correctly. The initial value of path within your shell shall be the pathname list contained in the PATH environment variable. Implement the path command as follows: • path (without arguments) displays the pathnames currently set. It should show pathnames separated by colons. For example, "/bin:/user/bin". • path + ./bin appends the pathname to the path variable. You may assume that only one pathname is added at a time. • path - ./bin removes the pathname to the path variable. You may assume that only one pathname is removed at a time
6 years ago
10
Purchase the answer to view it

- AnswerDocument.docx
- I need help
- The role of families and community
- respond
- hub
- The Origin of Man
- self evaluation
- Paper
- Assignment Information Due Date Sunday, April 2, 2017 11:59 PM Points Possible 100 View Rubric Define, describe and identify the elements of (a) good Data Backup Planning, (b) good Disaster Recovery Planning, and (c) good Business Continuity Planning. B
- Week 3 discuss
- Math Answers