In the first part of the assignment we have to create a shell which will accept a string consisting of 2 commands. The commands will match with applications which are already on Unix in the folder /bin.
The program mast support the :
[login to view URL] an application and display effects on the screen
[login to view URL] data from one application to another (by using pipes )
[login to view URL] an application and storing the results in a file( using exit redirection)
Use to indicate pipe symbol | and >> for redirection output.
General string form:
[ command1 ] [ arguments ] [ | or >> ] [ command2 ] [ arguments ]
Operating Examples 1:
• ls – l
• rm [login to view URL]
• / home / user / add 2 3
(even add your own program that displays the sum of the numbers given as arguments)
Operating Example 2:
• ls -l | ./show
(even show your own application that displays the result of ls -l between #)
Operating Examples 3:
• ls >> [login to view URL]
• pwd >> [login to view URL]
Also the shell you create should accept commands to be executed in 2 different ways
1. As arguments to main () during its execution, where in this case it will only run once and execute only one command.
2. Using an input function (scanf (), fgets (), ...), in which case it will run continuously and terminate when the "exit" command is given.
• It is forbidden to use the system () function.
• Implementation involving the use / call of a ready shell is unacceptable
(such as sh, bash, etc.)
The second part of the project is about implementing a client - server application (TCP / IP). The server will run the shell you implemented above and serve client requests that correspond to commands your shell can execute. After executing the command the results will be returned to the client.
• For the implementation of the client - server application you should use sockets (attention to the way of communication and the type of socket for the implementation of TCP / IP).
• The server should run continuously
23 freelancer đang chào giá trung bình €129 cho công việc này
Hi, I have understand the project requirement & interested to work for this project. I will start right now and I will do it within 12 hours. Please send a message so we can discuss more & start the project. Thanks.
Hello, dear. I have read your description carefully. I can understand your requirement. I can solve your C code problem. Please contact me and discuss over chat. Thanks.
Hello sir. We are interested in your project. We are highly experienced C programming. And you can check our portfolio. Please hire me. Thank you.