Build a shell in C using the POSIX system call API.
$10-30 USD
Paid on delivery
Prompt:Once started the user should be given a prompt that shows the current working directory (e.g.: /home/csci4401>) and the shell enters an infinite loop where it takes user commands and executes them.
Built-in commands:Shell should implement the cd and pwd commands that allow a user to change the current directory and to print the current directory, respectively. The exit command should allow orderly shell exit.
Simple program execution:Unless the user types in a built-in command, any other input should be interpreted as an effort to run an executable. In response, mash should fork() a process, execute the command and show the output (e.g.: ls -l).
Stream redirection:Your mash implementation should allow redirection of standard output/ input streams to/from a file. E.g:
o ls -l > output
o sort [url removed, login to view] > [url removed, login to view]
o sort < [url removed, login to view] > [url removed, login to view]
Pipes: Your mash should allow IPC via pipes. E.g.:
ls -l | grep sh | wc –l
You must implement redirection and pipes via system call such as fork(), pipe(), dup2(), execlp()/execvp(), chdir(), getenv()/setenv() and not rely on an existing shell implementation to do the work for you.
Implement own environment variables via setenv/printenv and PATH. These should be separate and in addition to the ones of the underlying system. In a particular, if an executable is not in the system's path but is the path of mash, it should be possible to execute it in mash (but not in bash)
Project ID: #7541001
About the project
Awarded to:
hi I am Dinh. I done some shell project. You can see it in here https://www.freelancer.com/jobs/Windows/Shell-project-UNIX/ Hope to work with you.
4 freelancers are bidding on average $84 for this job
Hi. I are experienced C/C++ programmer (over 6 years) well know of linux system calls and IPC. There are no implementation of environment variables in my proposal. Thanks.